Computer Science, asked by Jessej7163, 1 year ago

What is difference between divide and conquer and greedy method?

Answers

Answered by danielochich
22
Divide and conquer. This is a solving problem approach where we divide the data set in to parts and then combine the sub-part to get the solution to the main data set.  For example quick-sort, merger-sort and binary search.
Greedy method they are usually an optimization of recursive solution, typically applied where the recursion is solving one sub problem multiple times.
Greedy approach takes an approach and solve few cases assuming that solving them will get us the results.
It does not solve all the possible cases and compare them to get the most optimal value.

Similar questions