← Back

B+ Tree Simulator

What is a B+ Tree?

A B+ Tree is a balanced multiway search tree in which all records are stored in the leaf nodes. Internal nodes contain only separator keys, and the leaves are linked from left to right for efficient ordered and range queries.

Point searchO(log n)
InsertO(log n)
Range queryO(log n + k)
Leaf traversalO(n)

Tree operations

400 ms
B plus tree visualizationInteractive B plus tree with linked leaves.

Example B+ Tree loaded. Choose an operation.

Records0
Nodes0
Height0
Splits0

Search path

Query result

B+ Tree insertion idea

find the target leaf
insert the key in sorted order

if the leaf overflows:
    split the leaf
    copy the first key of the new right leaf
    into the parent

if an internal node overflows:
    split it
    promote its middle separator key

B+ Tree concepts

Records live in leaves

Internal keys guide the search but do not represent separate records. Every inserted value remains in exactly one leaf.

Separator copies

When a leaf splits, the first key of the new right leaf is copied into the parent and also remains in the leaf.

Linked leaves

Leaf nodes form a linked list. After locating the first matching leaf, a range query continues through the leaf links.

Balanced height

Every root-to-leaf path has the same length, keeping point searches logarithmic.

B-Tree versus B+ Tree

PropertyB-TreeB+ Tree
Record locationInternal or leaf nodesLeaf nodes only
Internal keysMay be recordsSeparator copies only
Leaf linksUsually absentTypically linked
Range queriesTree traversalLeaf-chain scan