B-Trees & Skip Lists: How Databases Index

Data Structures & Algorithms · Advanced Structures · Master · 30 min

Understand why databases index with wide B-trees and B+trees (disk pages), how inserts split nodes, and how skip lists give O(log n) search with coin flips, as in Redis sorted sets.

This lesson is part of TuringPath Pro. See plans.

What you will learn

  • Why disks change the rules
  • B-trees: fat, sorted, always balanced
  • Insert and split: the tree grows from the top
  • B+trees: what your database actually uses
  • Skip lists: express lanes on a linked list

More in Advanced Structures

Previous: Segment Trees & Fenwick Trees · Next: Arrays & Two Pointers