defining property: any node to my left is smaller or equal. left child <= parent AND right-child >= parent. Both children is allowed to be equal to parent -- binary search tree is completely unbiased.
The defining property defined visually: For each node, draw a vertical line (long shadow) through the tree.
* Left descendants' v-lines are on or inside my v-line.
* Right descendants' v-lines are on or outside my v-line.
When nodes move up or down the three, their shadows shift. I think this may help us visualize a BST successor, deletion and insertion.
The defining property defined visually: For each node, draw a vertical line (long shadow) through the tree.
* Left descendants' v-lines are on or inside my v-line.
* Right descendants' v-lines are on or outside my v-line.
When nodes move up or down the three, their shadows shift. I think this may help us visualize a BST successor, deletion and insertion.
the same group of items can build 2 different bs-trees, with different tree heights. How? The same entries could arrive out of sequence, just like IP packets.
The deeper the tree, the more iterations for a tree walk, the slower the sort.
The deeper the tree, the more iterations for a tree walk, the slower the sort.
Worst case bst has a tree height equal to input size, with one branch at each node?