@brijesh: if we have to find leftmost right cousin for 9 in the same tree..
then it shall be 8.. but 9 is in right subtree of 7..

On Tue, Aug 9, 2011 at 2:11 PM, Brijesh Upadhyay <
brijeshupadhyay...@gmail.com> wrote:

>                      10
>              4                      5
>        2          7          6         11
>    1     3    9   8     12  13   14   15
> let u have to fine leftmost right cousin of 8 . , move up , u get 10 as the
> ancestor , such that its left subtree contains 8 , unlike 7 ,4 (whose right
> subtree contains 8)!   now no of level u moved is 3 ...... then traverse in
> the right subtree of 10 , and find left most node , by moving down 3 levels,
> and u get 12 as ur answer...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/Lftrcml-FS0J.
>
> To post to this group, send email to algogeeks@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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