A B-Tree is a self-balancing search tree designed to maintain sorted data and allow efficient insertion, deletion, and search operations. Unlike binary trees, each node can hold multiple keys and have more than two children. B-Trees are widely used in databases and file systems where large blocks of data must be read and written efficiently.
When inserting a new key, it is placed into the appropriate leaf node. If the node overflows by exceeding the maximum number of keys, it splits — the median key is pushed up to the parent, while the remaining keys form two child nodes. This process can propagate upward and may even create a new root. This splitting mechanism is essential for keeping the tree balanced, ensuring that all leaves always remain at the same depth as keys are redistributed.
For simplicity, the order of this B-Tree visualizer is fixed to 3.
Sign in to join the discussion
Hand-picked resources to deepen your understanding
© 2025 See Algorithms. Code licensed under MIT, content under CC BY-NC 4.0.