Merge sort splits a list of n items into two halves, recursively sorts each half, and then merges the two sorted halves using about n comparison steps. Which recurrence describes its running time?
What does the equation T(n) = 2T(n/2) + n describe?
Binary search checks the middle and continues in both halves.
Circle one: True False
Merge sort splits in half, sorts both halves, and merges in linear time. What is its recurrence?
The work outside the calls dominates the work in the leaves. Which master theorem case holds?
For T(n) = 2T(n/2) + n, the master theorem compares n to n^(log base 2 of a) where a = 2 and b = 2. Which case applies and what is the result?
You draw the recursion tree for T(n) = 2T(n/2) + n. If the root does n work, how much work is done in total at the next level down (the two children)?
When you expand a recurrence into a tree, what does one level stand for?
A divide-and-conquer algorithm makes 4 recursive calls on half-size input and does n extra steps, giving T(n) = 4T(n/2) + n. What does the master theorem give?
Leaf work dominates, but a student names the second case. What went wrong?