latency.lab
C++ · the discipline of asking why

Understand the tool,
not just the answer.

Twenty topics, each one starting with a real lesson — what the tool actually is, why it works, the pattern that tells you when to reach for it, and the mistakes everyone makes with it the first time. Problems come after, as practice for what you just learned — not a substitute for learning it.

20 topics
arrays to graphs to DP
20 lessons
live right now
0 problems
for practice, after the lesson
0%
your progress

Twenty topics, in the order a real interview loop would test them

Arrays and hashing before graphs and DP — the ordering itself is part of the curriculum.

01
Arrays & Hashing
The foundation everything else builds on — O(1) lookups change what's even worth trying.
lesson live
02
Two Pointers
Turn an O(n²) scan into O(n) by moving from both ends at once.
lesson live
03
Sliding Window
The two-pointer idea, specialized for “best contiguous run of...” problems.
lesson live
04
Stack
LIFO order shows up everywhere — parentheses, expression parsing, monotonic-stack tricks.
lesson live
05
Binary Search
Not just for sorted arrays — for any answer space that's monotonic.
lesson live
06
Linked List
Pointer manipulation with no room for off-by-one errors to hide.
lesson live
07
Trees
Recursion's home turf — traversal, balance, and the invariants that make BSTs fast.
lesson live
08
Tries
Prefix search done properly, and the structure behind autocomplete.
lesson live
09
Heap / Priority Queue
Whenever the question is “give me the best k,” this is the answer.
lesson live
10
Backtracking
Systematic brute force — the discipline of pruning what obviously can't work.
lesson live
11
Graphs
BFS, DFS, topological sort, union-find — the largest topic here because it's the one interviews lean on most.
lesson live
12
1-D Dynamic Programming
The moment “try everything” becomes “remember what you already tried.”
lesson live
13
2-D Dynamic Programming
The same idea, one dimension harder to see.
lesson live
14
Greedy
When the locally-best choice actually is globally optimal — and proving it is the real skill.
lesson live
15
Intervals
Sort first, then a single pass — and knowing when that's actually enough.
lesson live
16
Bit Manipulation
The layer below the algorithm — what the machine is actually doing.
lesson live
17
Math & Geometry
Number theory and geometry problems that show up more in real interviews than people expect.
lesson live
18
Sorting
Implement the classics yourself once, so “just call std::sort” is a choice, not a knowledge gap.
lesson live
19
Design
Build a real data structure to a spec — an LRU cache, not a toy.
lesson live
20
Advanced Synthesis
Two or three techniques at once, the way a real onsite problem actually escalates.
lesson live

Learning it beats memorizing it

  • Every topic starts with a lesson, not a problem. What the tool actually is, why it gives the complexity it gives, and a decision framework for choosing it over the alternatives — before any code.
  • The real skill is recognizing the shape of a problem, not memorizing its solution. Each lesson names the canonical patterns explicitly, so the next unfamiliar problem still looks familiar.
  • Common mistakes are taught directly — the ones that cost people in real interviews and real code review, not just the ones a test suite happens to catch.
  • Problems reinforce the lesson and are graded on complexity, not just correctness — a hidden stress test is sized so a solution with the wrong complexity genuinely times out, the same way it would in a real interview.