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 [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.