Practice free →
HomeGATE CSEcomputerscienceAlgorithms › Per the lecture, dynamic programming differs fro…

Per the lecture, dynamic programming differs from divide and conquer because

AD&C uses recursion; DP never uses recursion
BD&C is faster than DP on every problem
CD&C sub-problems are independent; DP overlap
DDP requires sorted input; D&C does not
Answer & Solution
Correct answer: C. D&C sub-problems are independent; DP overlap
Both split into sub-problems. D&C's sub-problems are independent (merge sort's two halves share no work), so memoising doesn't help. DP's sub-problems repeat (Fibonacci, LCS, knapsack), so memoising collapses exponential repeated work into polynomial. DP also uses recursion (top-down) or iteration (bottom-up); sorted input is unrelated.
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions