liveBook · Manning

Divide-and-conquer approach

Also called divide-and-conquer strategy, divide-and-conquer algorithm

Divide and conquer is a problem-solving strategy that decomposes a problem into smaller subproblems, solves them separately, and combines or completes their results.

How 3 Manning books explain it

Grokking Algorithms, Second Edition

A divide-and-conquer strategy solves a problem by dividing it into smaller subproblems, solving those subproblems, and combining their results.

How it is used
Uses recursive decomposition as a general way to approach unfamiliar problems and develop quicksort.
How deep it goes
Works through base and recursive cases with a field and quicksort code, while deferring the proof behind the field reduction.
Examples
Uses equal square plots on a 1,680 m × 640 m field, recursive array summation, and pivot-based array sorting.
What you can do after
Build it from scratch by identifying a base case, reducing each recursive problem, and combining results in quicksort.

Read how Grokking Algorithms, Second Edition explains divide-and-conquer approach →

Functional Design and Architecture: Examples in Haskell

Divide and conquer is a design strategy that manages complexity by separating a problem into smaller, more independently tractable parts.

How it is used
Manages software complexity by separating responsibilities, interfaces, implementations, architectural layers, and error domains.
How deep it goes
Explains interface boundaries, substitution, dependency injection, adapters, and error-domain conversion, while stopping short of formal algorithmic analysis.
Examples
Uses sensor interfaces, thermometer implementations, an Observer, an IoC wiring example, and a Kelvin-to-Celsius adapter.
What you can do after
Apply interfaces, adapters, and dependency injection to isolate implementations and make software more maintainable, testable, and readable.

Read how Functional Design and Architecture: Examples in Haskell explains divide-and-conquer approach →

Machine Learning Algorithms in Depth

Divide and conquer is a problem-solving paradigm that recursively decomposes a problem into smaller subproblems and combines their solutions.

How it is used
Uses recursive decomposition to organize algorithmic solutions, including binary search and CART decision-tree construction.
How deep it goes
Explains decomposition, combination, recursion, binary-search complexity, and a from-scratch implementation, while deferring detailed CART treatment.
Examples
Uses binary search, quick sort, merge sort, heap sort, and recursive CART threshold partitioning as concrete examples.
What you can do after
Builds a recursive binary-search algorithm from scratch and recognize divide-and-conquer structure in machine-learning algorithms.

Read how Machine Learning Algorithms in Depth explains divide-and-conquer approach →

Also covered in

What to know first

Related concepts

Questions about divide-and-conquer approach

What is divide-and-conquer approach?

Divide and conquer is a problem-solving strategy that decomposes a problem into smaller subproblems, solves them separately, and combines or completes their results.

Which Manning books explain divide-and-conquer approach?

Grokking Algorithms, Second Edition, Functional Design and Architecture: Examples in Haskell and Machine Learning Algorithms in Depth.

What should I know before learning divide-and-conquer approach?

Manning books that teach divide-and-conquer approach usually introduce design pattern, functional programming, linear time complexity and object-oriented programming first.

What is the difference between divide-and-conquer approach and end-to-end testing?

Divide and conquer is a problem-solving strategy that decomposes a problem into smaller subproblems, solves them separately, and combines or completes their results. End-to-end testing evaluates a complete system workflow across integrated components, from an external entry point to its observable outcome.

What kinds of divide-and-conquer approach are there?

Kinds of divide-and-conquer approach include binary search.

What is divide-and-conquer approach also called?

Divide-and-conquer approach is also called divide-and-conquer strategy or divide-and-conquer algorithm.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.