Data Structure Visualizer
Builds the seven data structures every computer science course revolves around — binary search tree, AVL tree, red-black tree, min-heap, hash table, trie and union-find — and animates every insert, delete and search step by step. You see AVL rotations labelled LL/LR/RL/RR as they happen, red-black recoloring and fix-up rotations, heap sift-up and sift-down, hash collisions resolved by chaining or linear probing with a live load factor and an animated rehash, trie prefix paths lighting up, and union-find trees flattening under path compression. Step forward and backward through each operation at your own pace, or let it play.
Runs 100% in your browser — nothing you paste leaves your device.
Read the full guide to this tool
Notes
- Each operation is recorded as a list of snapshots, so you can step backwards — useful when a rotation flies by too fast.
- The hash table doubles its bucket count when the load factor passes 0.75 and rehashes every key, one step at a time — the hidden cost behind "amortized O(1)".
- Union-find uses union by rank plus path compression: watch a tall tree collapse to depth 1 after a single find.
- Red-black deletion is the classic CLRS algorithm with the full double-black fix-up cases.
- Runs 100% in your browser — nothing you paste leaves your device.