473 views
0 votes
0 votes
There is a height-balanced tree T storing n elements. The greatest element smaller than x in T is called the predecessor of s in T. Given any positive number k, we wish to compute k predecessors of x in T. What is the time complexity of the best algorithm that can do this task?

A. O(k + log n)

B. O(k log n)

C. O(log(n + k))

D. O(n + k)

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
Hakuna Matata asked May 23, 2018
1,136 views
What was the last rank in the waitlist group which got admission offer from IIT Kanpur last year?Is there any chance for waitlist rank of around 20?
1 votes
1 votes
1 answer
2
Hakuna Matata asked May 6, 2018
328 views
Are the admissions based solely on written & programming tests, or does GATE score get some weightage during final selection?