AlgoScope

B-Tree

Data structureadvancedBalanced Search Trees

A wide, shallow search tree tuned for block storage; nodes hold many keys.

Decision · step 7 of 18B-Tree: Four keys per node, fewer splits
3 8 15 27 40×

3 8 15 27 40 has 5 keys and the limit is 4, so it splits. The middle key, 15, moves up to the parent; the keys below it form the left node and the keys above it the right node.

Open in the player →or start at step 7

What you will see

Wide nodes; a full node splits into two and promotes its middle key.

How b-tree works →

Cost

searchO(log n)
insertO(log n)
deleteO(log n)
SpaceO(n)

Height is O(log_t n) for minimum degree t; disk reads scale with height.

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.

Screen readers: Each element is an accessibility element with position, value and state; structural changes are announced per step.

Reduced motion: Elements appear at their destination with a crossfade; no travel longer than the element's own size.

Before this

Related

Leads to

Topics that need this one first.

Taught by the same lesson

B-Tree covers these too, in the same run.