1.
What is the time complexity of searching for an element in a balanced Binary Search Tree (BST)?
A
O(1)
B
O(n)
C
O(log n)
D
O(n log n)
Answer and explanation
Correct Answer: C — O(log n)
In a balanced BST, the height is O(log n). At each level, we eliminate half the remaining nodes, so search takes O(log n).
