AlgoScope

B+ Tree

Data structureadvancedBalanced Search Trees

A B-tree where all values live in linked leaves, making range scans sequential.

Decision · step 5 of 23B-Tree: B+ tree: keys stay in the chained leaves
10 20 30×

10 20 30 has 3 keys and the limit is 2, so it splits. The middle key, 20, is copied up to the parent and stays in the right leaf; the keys below it form the left node and the keys above it the right node.

Open in the player →or start at step 5

What you will see

Internal nodes route; leaves form a linked chain that a range query walks.

How b-tree works →

Cost

searchO(log n)
range scanO(log n + k)
insertO(log n)
SpaceO(n)

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

Taught by the same lesson

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