algorithm - Binary search tree performance -
Then, takes a key (height) time, how much time it takes to find all the nodes with the key Compared to the given key? What are the constant factors?
If this is done properly, then you will probably get the key, and then the next one -Order
Then it will be O (Logan) + m where the number of worms is greater than m key.
The worst case will be o (Logan) + n = o (n)
Comments
Post a Comment