Divide and Conquer is not an algorithm; it's a pattern for the algorithm. It is designed in a way as to take dispute on a huge input, break the input into minor pieces, and decide the problem for each of the small pieces. Now merge all of the piecewise solutions into a global solution. This strategy is called divide and conquer.
Divide and conquer uses the following steps to make a dispute on an algorithm.
Divide: In this section, the algorithm divides the original problem into a set of subproblems.
Conquer: In this section, the algorithm solves every subproblem individually.
Combine: In this section, the algorithm puts together the solutions of the subproblems to get the solution to the whole problem.
Posted Date:- 2021-09-09 21:45:47