The solution of the recurrence relation T(n) = 3T(n/4) + n log n is
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. Θ(n log n)
Explanation
nlog43 ≈ n0.79 grows slower than n log n, and 3(n/4)log(n/4) ≤ (3/4) n log n satisfies regularity. Master theorem case 3: Θ(n log n).More Data Structures and Algorithms questions
- The number of nodes of height h in any n-element heap is at most
- Consider a B-tree of height h and minimum degree t ≥ 2 that contains n keys, n ≥ 1. Which of the following is correct?
- Which algorithm design approach is used in the quick sort algorithm?
- Consider a hash table of size 11 that uses open addressing with linear probing, with h(k) = k mod 11. Records with keys 43, 36, 92, 87, 11,…
- Consider the traversals of a tree: Preorder → ABCEIFJDGHKL Inorder → EICFJBGDKHLA Which of the following is the correct postorder traversal?
- How many rotations are required during the construction of an AVL tree if the following elements are inserted in the given sequence? 35, 50…