Red-Black Tree Interval Partition Explorer (2D)
Watch a red-black tree's insertion fix-up (uncle-red recoloring, LL/RR/LR/RL rotations) as a 2D recursive interval-partition diagram, with a live per-leaf black-height bar chart proving the balance invariant.
Same insertion fix-up as the 3D Rotation Case Explorer — a red uncle recolor cascade, or the LL/RR/LR/RL rotation shapes — but rendered as a genuinely 2D-native diagram: a recursive partition of the key domain into nested horizontal slabs, one per node, exactly matching the BST ordering invariant those keys already obey. A second live panel turns invariant (4) — every root-to-null-leaf path carries the same black-node count — into a bar chart that visibly flattens out as the fix-up completes, giving a direct numerical read on why red-black trees stay at O(log n) height.
Step through the exact red-black tree insertion fix-up cases — uncle-red recoloring and the LL/RR/LR/RL rotation shapes — as a 2D recursive interval-partition diagram, with a live per-leaf black-height bar chart proving the balance invariant.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install