All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2018

The solution of recurrence relation : T(n) = 2T(sqrt(n)) + lg(n) is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. O(lg(n) lg(lg(n)))

Explanation

Let n = 2ᵐ and S(m) = T(2ᵐ): S(m) = 2S(m/2) + m, so S(m) = O(m lg m). With m = lg n, T(n) = O(lg n · lg lg n).

More Data Structures and Algorithms questions