B-Tree
Overview
A B-tree of order
- Every node has at most
children. - Every node, except for the root, has at least
children. - All leaves appear on the same level.
- A node with
children contains keys sorted in monotonically increasing order.
The above is a modification of Knuth's definition in his "Art of Computer Programming" that defines leaves of the tree more consistently with how I use the term elsewhere. It also pulls in concepts from CLRS (such as keys needing to be sorted within nodes).
Insertions
A node of a B-tree of order
B+ Tree
The B+ tree is a B-tree with the following differences:
- Internal nodes do not store values; that is, all values are stored in the leaf nodes.
- Leaf nodes may include a pointer to the next leaf node to speed sequential access.