I came to know the height of Random-BST/Red-Black trees and some other trees are O(log n)
.
I wonder, how this can be. Lets say I have a tree like this
The height of the tree is essentially the depth of the tree, which is in this case will be 4
(leaving the parent depth). But how could people say that the height can be represented by O(log n)
notion?
I'm very to algorithms, and this point is confusing me a lot. Where I'm missing the point?