Skip to main content
←Architecture WorkspaceArchOSWorkspaces/
Sign in
ALGORITHM CANVAS · B+TREE / BALANCED BST · TIME O(log_B N) · SPACE O(N)
B+Tree Page Split & Balanced Search Tree
High fan-out B+Tree pages keep disk I/O depth at 3–4 levels for billions of rows; leaf pages link sequentially for fast range scans.
TREE TREE (1 ACTIVE NODES)50
STEP 1/4 · L8
tree=[50,null,null,null,null,null,null]k=50
PYTHON 3.12 · INSTANT PREVIEW
1def bst_insert_levels(keys):
2 tree = [None] * 7
3 for k in keys:
4 idx = 0
5 while idx < 7 and tree[idx] is not None:
6 idx = 2 * idx + 1 if k < tree[idx] else 2 * idx + 2
7 if idx < 7:
8 tree[idx] = k
9 return tree