for bst
step 1 :count the number of nodes in a tree
step2: traverse in inorder.after each node visit decrement n. if n == k then
the result
On Sun, Sep 4, 2011 at 12:33 AM, teja bala <[email protected]>wrote:

> //Asked in MS please help me with the coding or Give an algorithm
>
>
> Write code to return the kth largest element in a tree ...>>> function
> prototype is int fucnkth(node *root,int k)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

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

Reply via email to