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 leaves
Balanced tree
The recomputed height is 3 with 7 pages. Note: every leaf sits at the same rendered level.
h=3,pages=7
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.
leaves=4,d=2
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.