Repeat the previous problem using an AVL tree, achieving a running time of O(s logn). Why doesn’t the solution to the previous problem trivially result in an O(s+logn) algorithm for AVL trees?
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.