BSTs, AVL rotations, red-black recoloring, heaps, tries, and segment trees — live.
10 visualizations
Visits every node in in-order, pre-order, post-order, or level-order — the four canonical traversals.
An ordered tree where left < node < right, giving O(h) search, insertion, and deletion.
Visits a binary tree breadth-first, level by level, using a FIFO queue to process nodes in order.
Builds a binary min-heap via sift-up insertions and removes the minimum with sift-down, all in an array.
Stores a set of strings in a prefix tree, sharing common prefixes; supports fast insert and lookup by walking edges.
A height-balanced binary search tree that rotates after inserts to keep every balance factor in {−1, 0, +1}.
Answers range-sum queries and point updates in O(log n) by storing partial sums over a binary tree of index ranges.
A compact array that answers prefix-sum queries and point updates in O(log n) using the low-bit trick i & −i.
A self-balancing BST that uses node colors and 5 invariants to guarantee O(log n) operations with few rotations.
A balanced multiway search tree where nodes hold many keys and split when full, keeping all leaves at the same depth.