I'm trying to figure out the same problem as stated in this question.

In brief, I want to reconstruct an existing splay tree (printed on paper) on Splay Tree Visualization by inserting the values in the existing tree.

I know the general idea is to insert the values from lower levels to the upper levels. So I've tried inserting the values in the existing tree in post order and reverse level order, but both failed.

So, in what order shall I insert the values into an empty splay tree to reconstruct the existing one?

P.S. The splay tree I used for my trials: A splay tree

  • $\begingroup$ (Please properly attribute every "external" contents you quote&refer.) I tried right-to-left & bottom-to-top. $\endgroup$ – greybeard May 4 '20 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.