1

Let's say I have some splay tree as following:

enter image description here

I want to recrate the exact same Splay tree using insert(key) method. Is there an algorithm that given some Splay tree traversal (or any other representation) will create the same Splay tree?

In other words, assume you are using some online tool to visualize your Splay tree. What algorithm would you follow to recreate the above Splay tree?

vesii
  • 223
  • 1
  • 7

0 Answers0