Why does every recursive divide-and-conquer algorithm need an explicit base case?
Ato satisfy the SQL standard
Bto make the algorithm stable
Cwithout a base case the recursion never terminates
Dthe master theorem requires a finite a
Answer & Solution
Correct answer: C. without a base case the recursion never terminates
Recursion stops only when a base case is reached (typically size 1 or 0). Without it, the recursive call keeps subdividing forever, crashing on stack overflow. SQL standards have nothing to do with algorithms; stability is a sorting property; master-theorem's `a` is unrelated to base cases.
Related questions
An NP-hard problem differs from an NP-complete one because NP-hard problemsThe first problem proved to be NP-complete wasA problem X is NP-complete if and only ifWhy does theoretical computer science draw the line at 'polynomial-time' for tractability?Which set inclusion is established (i.e., proven, not open)?The class NP is the set of decision problems for whichFloyd-Warshall detects the presence of a negative cycle byTopological sort is well-defined for