
B-trees optimize disk-based sorted data with O(log n) reads per query
Image: Malcolm_Morley (talk) (Uploads), Public domain, via Wikimedia Commons
B-trees optimize disk-based sorted data with O(log n) reads per query
LSM trees optimize: write-heavy workloads by buffering writes in memory
LSM trees optimize write-heavy workloads by buffering writes in memory
O(n log n) is the lower bound for comparison-based sorting
O(n log n) is the lower bound because each of n elements must be compared at least log n times to ensure all permutations are considered
merge sort: O(n log n) always
Merge sort consistently performs at O(n log n) time complexity for any input size
Binary search
Time complexity of binary search: O(log n) — halves search space each step
consistent hashing does: minimizes remapping when nodes join/leave
Consistent hashing distributes data across nodes, minimizing remapping when nodes join/leave
BFS vs DFS: BFS finds shortest path in unweighted graphs, DFS uses less memory
BFS finds shortest path in unweighted graphs; DFS uses less memory
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews