The worst-case time complexity of search in a BST is?
The worst-case time complexity of search in a BST is?
Choose an Option
Answer
O(n)
Theory
BST average search is O(log n); however, a skewed tree degenerates to a linked list.
Solution
Skewed BST → O(n) worst case.