For the first part, I doubt if it is possible. Consider the following
trees T1 and T2, specified in level-order, with  -1 representing NULLs.

T1:  y   a  x  -1  -1   b    c
T2:  x   y  c   a   b   -1  -1

T2 is the tree obtained by a single left-rotation from T1. I think, it
should not be possible to convert T1 to T2 using only right-rotations.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to