📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      What is the worst-case time complexity for searching an element in an unbalanced Binary Search Tree?

      A O(1) Correct Answer Incorrect Answer
      B O(log n) Correct Answer Incorrect Answer
      C O(n) Correct Answer Incorrect Answer
      D O(n log n) Correct Answer Incorrect Answer
      E O(n^2) Correct Answer Incorrect Answer

      Solution

      In the worst-case scenario, an unbalanced BST can degenerate into a skewed tree (like a linked list), where search, insertion, and deletion operations take O(n) time, proportional to the number of nodes.

      Practice Next
      ask-question