The Pattern
Get to know about common recursive patterns, such as divide and conquer and backtracking.
We'll cover the following
How it works
Both merge-sort and quick-sort follow a general three-step pattern called divide and conquer:
- Divide the given instance of the problem into several independent smaller instances of exactly the same problem.
- Delegate each smaller instance to the Recursion Fairy.
- Combine the solutions for the smaller instances into the final solution.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy