Question: We say that a binary search tree T 1 can be right-converted to binary search tree T 2 if it is possible to obtain T
We say that a binary search tree T1 can be right-converted to binary search tree T2 if it is possible to obtain T2 from T1 via a series of calls to RIGHT-ROTATE. Give an example of two trees T1 and T2 such that T1 cannot be right-converted to T2. Then, show that if a tree T1 can be right-converted to T2, it can be right-converted using O(n2) calls to RIGHT-ROTATE.
Step by Step Solution
3.45 Rating (161 Votes )
There are 3 Steps involved in it
A good counterexample is that T112 T221 T1 cannot be rotated ri... View full answer
Get step-by-step solutions from verified subject matter experts
