JOSEPH SAPUTRA - TREE VISUALIZER

Documentation

Binary Tree

Nodes with up to two children. Common traversals: Preorder (Root, Left, Right), Inorder (Left, Root, Right), Postorder (Left, Right, Root), Level-order (BFS).

Try it live: /visualize?model=binary

Binary Search Tree (BST)

For every node, keys in the left subtree < node.key < keys in the right subtree. Inorder traversal yields sorted order.

Try it live: /visualize?model=bst&op=insert&vals=7,3,5

Complexities

OperationAverageWorst
BST Search/Insert/DeleteO(log n)O(n) (degenerate)
TraversalsO(n)

Glossary