BST and Splay Tree Demo Documentation
When you load the demo page, there will be 9 buttons and one field where you
can type integers. The integer currently in this field will be called the
value. The buttons operate as follows:
- insert - Insert the value into the tree.
- delete - Remove the node containing the value from the
tree.
- search - Find the node containing the value in the tree.
- traverse - Perform an inorder traversal of the tree.
- reset - Replace the current tree with a canned tree. You can
use the canned tree if you don't want to spend time creating one from
scratch with a sequence of insertions.
- splay on/off - Operations performed on the tree will treat the
tree as either a BST or a splay tree. This button toggles the nature of
the tree. If the tree is a splay tree, you will see the rotations
performed.
- faster - Make the animations (e.g. of rotations) move
faster.
- slower - Make the animations (e.g. of rotations) move
slower.
- clear - Replace the current tree with an empty tree.
You can also move nodes in the tree around, e.g. to improve readability, by
clicking on the node and then dragging it to the desired location.