juver++, If we do inorder traversal (right_child -- >> parent -- >>
left_child) and output kth element then we are done.
I didn't understand the 2nd point, why we need to modify the bst
(store clind count at each node).
Am I missing anything here? Please advise.


On Jan 12, 12:04 am, juver++ <avpostni...@gmail.com> wrote:
> 1. Make inorder traversal and output k-th element.
> 2. Store in each node additional variable - amount of nodes in the subtree
> rooted at node. Process the query in O(height)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to