Tech-Interview-Cheat-Sheet
Tech-Interview-Cheat-Sheet copied to clipboard
The time complexity of Binary Search Tree is not precise.
The Time Complexity for Binary Search Tree (BST) basic operations (Insert, Remove and Search) is not O(log n) if the BST is unbalanced (is O(logn) only when we are talking about Balanced BST such as AVL and Red-Black). The correct time complexity would be O(h) where h is the height of the BST. It is h because the BST may become skewed as the following image.

Well I'II look into this and get back to you