To search for value 1, I do the following splay operations:
And hence obtain 1 in the root. But why would this be incorrect?
The final tree in this case is different.
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community