> For the complete documentation index, see [llms.txt](https://cs61b-2.gitbook.io/cs61b-textbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cs61b-2.gitbook.io/cs61b-textbook/17.-b-trees/17.4-b-tree-invariants.md).

# 17.4 B-Tree Invariants

## B-Tree Invariants

Because of the way B-Trees are constructed, they have two invariants:

1. All leaves are the same distance from the root.
2. A non-leaf node with k items must have exactly k + 1 children.

These two invariants guarantee a "bushy" tree with $$\log N$$ height.
