Start here
Algorithms
Learn Algorithms as a connected topic across chapters, concepts, simulations, and interview reasoning.
AlgorithmsMental ModelTradeoffsFailure ModesInterview ReasoningHyperLogLog
Begin with
HyperLogLog gives you the cleanest entry point before branching into constraints, failures, and related systems.
31
Chapters
10
Concepts
Related systems
Follow the nearby ideas
Use the map as a quiet orientation layer, then move back into the articles for depth.
Guidance
Algorithms
Continues from what you have already explored.
System behavior
HyperLogLog Cardinality Estimation
Hash values route into registers, leading-zero runs update maxima, and the harmonic mean estimates unique cardinality with bounded error.
Step 1 / 3Normal flow
Read in sequence
1HyperLogLog Explained: Counting Billions of Unique Items with 12 KBTLDR: HyperLogLog estimates the number of distinct elements in a dataset using ~12 KB of memory regardless of cardinality — with ±0.81% error. The insight: if you hash every element to a random bit st18 min2Count-Min Sketch Explained: Frequency Estimation at Streaming ScaleTLDR: Count-Min Sketch (CMS) is a fixed-size d × w counter matrix that estimates how often any element has appeared in a stream. Insert: hash the element with each of the d hash functions to get one c22 min3Bloom Filters Explained: Membership Testing with Zero False NegativesTLDR: A Bloom filter is a bit array of m bits + k independent hash functions that sets k bits on insert and checks those same k bits on lookup. If any checked bit is 0, the element is definitely not i19 min4Big O Notation Explained: Time Complexity, Space Complexity, and Why They Matter in InterviewsTLDR: Big O notation describes how an algorithm's resource usage grows as input size grows — not how fast it runs on your laptop. Learn to identify the 7 complexity classes (O(1) through O(n!)), deriv34 min5Probabilistic Data Structures: A Practical Guide to Bloom Filters, HyperLogLog, and Count-Min SketchTLDR: Probabilistic data structures trade a small, bounded probability of being wrong for orders-of-magnitude better memory efficiency and O(1) speed. Bloom Filters answer "definitely not in this set"14 min6Two Pointer Technique: Solving Pair and Partition Problems in O(n)TLDR: Place one pointer at the start and one at the end of a sorted array. Move them toward each other based on a comparison condition. Every classic pair/partition problem that naively runs in O(n²) 16 min7Tries (Prefix Trees): The Data Structure Behind AutocompleteTLDR: A Trie stores strings character by character in a tree, so every string sharing a common prefix shares those nodes. Insert and search are O(L) where L is the word length. Tries beat HashMaps on 17 min8Sliding Window Technique: From O(n·k) Scans to O(n) in One PassTLDR: Instead of recomputing a subarray aggregate from scratch on every shift, maintain it incrementally — add the incoming element, remove the outgoing element. For a fixed window this costs O(1) per16 min9Merge Intervals Pattern: Solve Scheduling Problems with Sort and SweepTLDR: Sort intervals by start time, then sweep left-to-right and merge any interval whose start ≤ the current running end. O(n log n) time, O(n) space. One pattern — three interview problems solved.
13 min10In-Place Reversal of a Linked List: The 3-Pointer Dance Every Interviewer ExpectsTLDR: Reversing a linked list in O(1) space requires three pointers — prev, curr, and next. Each step: save next, flip curr.next to point backward, advance both prev and curr. Learn this once and you 16 min11Fast and Slow Pointer: Floyd's Cycle Detection Algorithm ExplainedTLDR: Move a slow pointer one step and a fast pointer two steps through a linked structure. If they ever meet, a cycle exists. Then reset one pointer to the head and advance both one step at a time — 17 min12DFS — Depth-First Search: Go Deep Before Going WideTLDR: DFS explores a graph by diving as deep as possible along each path before backtracking, using a call stack (recursion) or an explicit stack. It is the go-to algorithm for cycle detection, path f15 min
Showing the top 12 of 31 matching chapters.
Related threads

