GATE Computer ScienceVery hardGATE CSE · UGC NET
The recurrence T(n) = 2T(n/2) + n/log₂ n (with T(1) = 1) has the solution
- A. Θ(n log log n)
- B. Θ(n log n)
- C. Θ(n)
- D. Θ(n / log n)
Correct answer: A. Θ(n log log n)
Unrolling gives Σ n/(log n − i) over levels = n·H(log n) = Θ(n log log n); the Master theorem does not apply because the driving term is not polynomially comparable.
More Algorithms questions
- Top-down merge sort (split at ⌊n/2⌋, standard merge that stops comparing once one list is exhausted) sorts [38, 27, 43, 3, 9, 82, 10, 15…
- A DFS is run on a directed graph with adjacency lists 0:[1,4], 1:[2,5], 2:[0,3], 3:[1], 4:[5,6], 5:[3], 6:[4,5], 7:[3,6]. Vertices are…
- In how many different ORDERED sequences of coins from {1, 4, 5} can a total of exactly 15 be formed (sequences like 1,4 and 4,1 count…
- How many binary strings of length 12 do not contain three consecutive 1s as a substring?
- Five keys k1<k2<k3<k4<k5 are searched with access frequencies 4, 2, 6, 3, 9. For a binary search tree over these keys, with the root at…
- What is the minimum number of comparisons needed in the worst case to find the SECOND smallest of 100 distinct elements?