Divide-and-conquer algorithm: Difference between revisions

Content deleted Content added
Line 38:
 
In all these examples, the D&C approach led to an improvement in the [[asymptotic complexity|asymptotic cost]] of the solution.
For example, if (a) the [[Recursion (computer science)|base cases]] have constant-bounded size, the work of splitting the problem and combining the partial solutions is proportional to the problem's size ''n'', and (b) there is a bounded number ''p'' of subproblemssub-problems of size ~ ''n''/''p'' at each stage, then the cost of the divide-and-conquer algorithm will be O(''n'' log<sub>''p''</sub>''n'').
 
=== Parallelism ===