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

The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree ?
#295 MCQ
The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree ?
#295 MCQ
The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree ?
#295 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......