Visualize
Binary Search Tree
Insert, search and traverse a live BST — see rotations and paths as they happen.
Module · Binary Search Tree
BST Visualizer
Insert, search, and traverse nodes with animated path highlighting.
Nodes: 7 · Left subtree < parent < right subtree
Traversals
Operation History
- #1Initialized BST with sample nodes.
Time Complexity
Insert
- Average
- O(log n)
- Worst
- O(n)
- Space
- O(1)
Search
- Average
- O(log n)
- Worst
- O(n)
- Space
- O(1)
Traversal
- Average
- O(n)
- Worst
- O(n)
- Space
- O(h)
How It Works
A Binary Search Tree stores values where every left child is smaller and every right child is larger than its parent.
Insert and search walk from the root, comparing at each node. Yellow highlights show the path taken; green marks a found node; violet animates traversal order.