Skip to main content

3 docs tagged with "data structures"

View all tags

B tree vs. B+ tree

B-trees and B+ trees are the workhorses of on-disk databases. B-trees store data in every node; B+ trees keep leaves as a linked list and push all data to the leaves. That single structural difference drives all the practical trade-offs — range scans, cache behavior, and why almost every relational database uses a B+ tree.

Bloom Filter

A Bloom filter is a compact probabilistic set-membership data structure — ~10 bits per element for 1% false positives, zero false negatives. Notes on how it works, the math for picking parameters, where real systems use it (Cassandra, HBase, Chrome, CDNs), and when to reach for counting / cuckoo / quotient variants instead.

Skiplist

A skip list is a probabilistic, multi-level linked list that supports O(log n) search, insert, and delete. Used by LevelDB's MemTable, Redis's Sorted Set, and Lucene's inverted index. Notes on how it works, why it's chosen over balanced BSTs, and the concrete trade-offs in each real-world implementation.