I would like to know some of the complexities of the binary search tree.
I can not find the full information. I want to know the difficulties for the following operations in a binary search tree
O(log(n))
Insert, delete, and search in the binary search tree:
O(N)
O(log(N))
If you have a balanced binary tree, all three difficulties will be O(log(N)) . If you are not balancing the tree, it could be O(N) .
Search is effective. But an unbalanced structure (which often happens) can lead to O (N) for search / insert / delete operations. This is why binary heap or other balanced trees are preferred with O (log n). .