The solution of the recurrence relation T(m) = T(3 m/4) + 1 is :
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. θ (lg m)
Explanation
The problem shrinks by a constant factor each step with O(1) work, so the depth is log_{4/3} m: Θ(lg m) (Master theorem case 2 with a = 1, b = 4/3).
More Data Structures and Algorithms questions
- Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of…
- Which of the following algorithms solves the single-source shortest paths ?
- A text is made up of the characters A, B, C, D, E each occurring with the probability 0.08, 0.40, 0.25, 0.15 and 0.12 respectively. The opt…
- A binary search tree in which every non-leaf node has non-empty left and right subtrees is called a strictly binary tree. Such a tree with…
- Match the following with respect to algorithm paradigms :
- The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number) :