Week 4 Discussion Forum

What is Divide & Conquer??

What is Divide & Conquer??

by MD.TORIKUL ISLAM ( 192-15-2852 ) EMON -
Number of replies: 1

divide and conquer algorithm is a strategy of solving a large problem by

  1. breaking the problem into smaller sub-problems
  2. solving the sub-problems, and
  3. combining them to get the desired output.

Here it means:

  1. Divide: Divide the given problem into sub-problems using recursion.
  2. Conquer: Solve the smaller sub-problems recursively. If the subproblem is small enough, then solve it directly.
  3. Combine: Combine the solutions of the sub-problems which is part of the recursive process to get the solution to the actual problem.


78 words

In reply to MD.TORIKUL ISLAM ( 192-15-2852 ) EMON

Re: What is Divide & Conquer??

by MD. IFTEKHARUL ISLAM RIDOY -

Divide and conquer, the most well known algorithm design strategy:

a) Divide the problem into two or more smaller subproblems.
b) Conquer the subproblems by solving them recursively.
c) Combine the solutions to the subproblems into the solution for the original problem
Examples: Binary search, Quick sort, Merge sort

48 words