Let T be an arbitrary splay tree storing n elements A1, A2, . An, where A1 ≤ A2 ≤ . . . ≤ An.
We perform n search operations in T, and the ith search operation looks for element Ai. That is, we search for items A1, A2, . . . , An one by one.
What will T look like after all these n operations are performed? For example, what will the shape of the tree be like? Which node stores A1, which node stores A2, etc.?
Prove the answer you gave for formally. Your proof should work no matter what the shape of T was like before these operations.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here