A **B-tree** is a balanced search tree that stores multiple sorted keys in each node. An internal node can have many children, with each child covering a different range of keys.

For example, a node with keys `20` and `50` can have three children. When looking for `35`, you follow the middle child, which covers keys between `20` and `50`.

All leaves are at the same depth. As keys are inserted or deleted, the tree can split or merge nodes to stay balanced. Search, insertion, and deletion take logarithmic time.

B-trees are useful for database indexes and filesystems because each node can hold many keys in a single storage page. That keeps the tree shallow, so a lookup usually needs to read only a few pages.