Questions: Divide and Conquer

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

An algorithm splits a problem into 3 independent subproblems of size n/3 and combines their results in O(n) time. Applying the Master Theorem (a=3, b=3, f(n)=O(n)), what is the overall time complexity?

AO(n)
BO(n log n)
CO(n²)
DO(log n)
Question 2 Multiple Choice

What is the essential property that distinguishes divide and conquer from dynamic programming?

ADivide and conquer always achieves better time complexity than dynamic programming
BDivide and conquer is iterative while dynamic programming is recursive
CIn divide and conquer, the subproblems are independent; in dynamic programming, subproblems overlap and share results
DDivide and conquer can only be applied to sorting and searching problems
Question 3 True / False

In a typical divide and conquer algorithm, the combine step is often where most of the computational work occurs.

TTrue
FFalse
Question 4 True / False

Binary search is a straightforward example of divide and conquer because it recursively processes both halves of the sorted array.

TTrue
FFalse
Question 5 Short Answer

In the Master Theorem recurrence T(n) = aT(n/b) + f(n), what do a, b, and f(n) represent, and what comparison drives the theorem's three cases?

Think about your answer, then reveal below.