Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

4. Decrease|Divide & Conquer

Two ways to reduce a problem recursively. Decrease and conquer shrinks it to one smaller instance: insertion sort, topological sorting, generating subsets, binary search, quickselect. Divide and conquer splits it into several: mergesort, quicksort, binary tree traversals and the closest pair.

Slides

Present full screen Download the PDF

Click or tap the slide to move forward, its left edge to go back; the arrow keys work too.

Implementations

Generating Subsets

Generating Permutations