B-tree Pages
All Leaves Equal Depth
A B-tree keeps every leaf at the same depth.
Leaves stay level
A B-tree keeps all leaves at the same depth. That balance is what keeps every search bounded by the tree height. Note: the invariant is checked on the recomputed tree.
Balanced tree
The recomputed height is 3 with 7 pages. Note: every leaf sits at the same rendered level.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
Leaf depth
There are 4 leaves, and each leaf has recomputed depth 2. Note: equal leaf depth is structural, not a caption guess.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
A smaller tree has the same rule
The smaller compiled tree has height 2, leaf count 3, and leaf depth 1. Note: equal-depth leaves are checked before rendering here too.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
Summary
Balance means every search reaches a leaf at the same depth. Note: a page models a node; real B-trees tune fanout to disk; no I/O or perf claims.