B+ tree (code by Claude, guidance by Georgios Evangelidis)
Internal nodes hold separator keys only; every key lives in a leaf, and the leaves are chained left to right so range scans never climb back up the tree. Insert, delete and search to watch splits, borrows and merges happen.
Keys or ranges, e.g. 5, 8, 10-30, 0-100 step 5
Range scan
Tree
History
Height 0
Nodes 0
Keys 0
Max keys per node 0
Min keys (leaf / internal) 0
Operation log
Reading the diagram
Internal node (separators)
Leaf node (actual keys)
Node visited by the current operation
Key found or returned
Dots on an internal node mark child pointers. Pointer i leads to keys k with sep[i-1] ≤ k < sep[i]. Dashed arrows are the leaf chain. After deletes, a separator may be a key that no longer exists in any leaf; it still routes searches correctly.