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 ?

  1. A.

    O(n)

  2. B.

    O(log n)

  3. C.

    O(n log n)

  4. 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).

Explore the full course: Niacl Ao It Specialist