Computer Sciences > Gate 2020 > Binary Search Tree
In a balanced binary search tree with n elements, what is the worst case time complexity of reporting all elements in range [a,b] ? Assume that the number of reported elements is k.
A
Θ(log n)
B
Θ(log(n)+k)
C
Θ(k log n)
D
Θ(n log k)

Correct : b

Similar Questions

While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
#34 MCQ
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
#69 MCQ
Let T be a binary search tree with 15 nodes. The minimum and maximum possible heights of T are: Note: The height of a tree with a single node is 0.
#211 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......