BST Shape Animations

1 min read Original article ↗

Binary search tree shape animations

There are 3 animation types:

  • ExteriorHeights measures the heights of the nodes along the left-most and right-most paths from the root. This illustrates the balance of the tree.
  • InteriorHeights measures the heights of the interior subtrees along the left-most and right-most paths from the root. That is, the right subtrees along the left-most path, and the left subtrees of the right-most path.
  • NodesPerLevel counts the number of nodes per level on either side of the root.

There are 2 operation types:

  • Insert inserts a new value using the current access pattern.
  • InsertDelete alternates between insertion and deletion when size > 10k.


Use spacebar or the mouse or touch to advance.