I have a question on time complex in trees operations.
It\'s said that (Data Structures, Horowitz et al) time complexity for insertion, deletion, search, finding mins-ma
O(h)
means complexity linear dependent on tree height. If tree is balanced this asymptotic becomes O(logn)
(n - number of elements). But it is not true for all trees. Imagine very unbalanced binary tree where each node has only left child, this tree become similar to list and number of elements in that tree equal to height of tree. Complexity for described operation will be O(n)
instead of O(logn)