What Is Divide And Conquer Algorithm

Decent Essays
Background of the problem

1.Divide and Conquer :-

Merge sort runs worst, best and average case in Θ(nlgn).

Divide-and-conquer, breaks a problem into subproblems that are similar to the original problem, recursively solves the subproblems, and finally combines the solutions to the subproblems to solve the original problem. You should think of a divide-and-conquer algorithm as having three parts:

1. Divide the problem into a number of sub-problems that are smaller instances of the same problem.

2. Conquer the sub-problems by solving them recursively. If they are satisfying enough, solve the sub-problems as base cases.

3. Combine the solutions to the sub-problems into the solution for the original problem.

2.Dynamic Programming
Get Access