The worst case complexity for searching an element in binary search tree is…

2018

The worst case complexity for searching an element in binary search tree is _____.

  1. A.

    O(log n)

  2. B.

    O(n log n)

  3. C.

    O(n²)

  4. D.

    O(n)

Attempted by 1391 students.

Show answer & explanation

Correct answer: D

A Binary Search Tree (BST) allows efficient searching when it is balanced. However, in the worst case, the BST can become skewed (like a linked list), for example when elements are inserted in sorted order. In that case, searching may require traversing all n nodes, so the worst-case time complexity is O(n).

Explore the full course: Up Lt Grade Assistant Teacher 2025