What is the worst-case time complexity of searching in a completely skewed Binary Search Tree containing N nodes?

Options

  • A. O(1)
  • B. O(log N)
  • C. O(N)
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. O(N)

Detailed Explanation

A completely skewed BST has a structure similar to a linked list. Consequently, searching for an element may require visiting every node, giving a worst-case time complexity of O(N). In a balanced BST, the height is approximately O(log N), allowing search in logarithmic time. Self-balancing trees such as AVL trees and Red-Black trees help maintain logarithmic height.