Algorithms

Divide and conquer

Solving a problem by splitting it into smaller problems of the same kind, solving each one and combining the results.

Example

To sort 8 numbers, merge sort splits them into 2 groups of 4, then 4 of 2, sorts them and merges them back.

Test yourself: Divide and conquer

Divide and conquer

To build a 1,000-piece puzzle as a group, each person builds a corner and then they are joined. That is ___ and conquer.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.