What is the time complexity of searching for an element in a balanced Binary…
2026
What is the time complexity of searching for an element in a balanced Binary Search Tree with n nodes ?
- A.
O(n)
- B.
O(log n)
- C.
O(n log n)
- D.
O(1)
Attempted by 99 students.
Show answer & explanation
Correct answer: B
In a balanced Binary Search Tree, the height is O(log n). Therefore, searching for an element requires traversing from the root to a leaf node, resulting in a time complexity of O(log n).