AI engineering glossary · Data structures algorithms
What is divide and conquer?
Divide and conquer: A strategy that splits a problem into smaller independent subproblems of the same kind, solves each, and combines the answers. Its cost is often analysed with a recurrence relation. Merge sort and binary search are classic examples of the approach.
Divide and conquer: an example
Merge sort splits a list of 1,000 items into two of 500, sorts each, and merges, repeating until single items remain.
Related terms
More Data structures algorithms terms
- Doubly linked list
- Dynamic array
- Dynamic programming
- Edit distance
- Fenwick tree
- Floyd-Warshall algorithm
- Graph
- Greedy algorithm
Where you learn it
Divide and conquer is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.