AlgoScope

2-3 Tree

A perfectly balanced search tree whose nodes hold one or two keys.

Data structures, data structure, advanced
Split 10 20 30 around 20.10 20 30

B-Tree: A 2-3 tree grows by splitting

Decision, step 5 of 17

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

Cost

Search
O(log n)
Insert
O(log n)
Delete
O(log n)
Space
O(n)

Leads to

Topics that need this one first.

Taught by the same lesson

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