BSTrootleafinsert.txt
Consider an initially empty BST and the sequence of values 1 2 3 4 5 6.
- Show the tree resulting from inserting these values "at the leaf". What is its height?
- Show the tree resulting from inserting these values "at the root". What is its height?
-
Show the tree resulting from an alternate at-root-insertion and at-leaf-insertion, starting with at-the-leaf. What is its height?
Description: at the leaf: Description leaf can be directly inserted into, need not be moved
at the root: the need to adjust to the root, but one by one to adjust
Splaying.txt
- Given an initially empty splay tree:
-
show the changes in the splay tree after each splay-insertion of the node values 5 3 8 7 4
-
- Given an initially empty splay tree:
-
show the changes in the splay tree after each splay-insertion of the node values b c d e f g ...
-
and then the splay tree after a search for node a ...
-
and then the splay tree after a search for node d
-
Note: If you can not search element, that element will splay, in accordance with the rules of operation zigzag or zigzig