← Practice
Career Path 60
If you only work through one bank, work through this one. It is ordered, not ranked: each question assumes the ones before it, and the concurrency questions in the middle are the ones that separate candidates in a quant loop.
It is deliberately not two hundred questions. Sixty questions you can explain out loud beats four hundred you have skimmed, and the Explain Mode gate on this bank exists to enforce exactly that difference.
12 questions
- Find a pair summing to a target, in a sorted arrayThe two-pointer pattern in its smallest useful form. The point is not the answer; it is being able to say why the pointers never miss a pair.easyWrittenExplain to unlock#arrays#two-pointers15 min
- Longest run of distinct elementsSliding window with a "last seen" map. The trap is the pointer that moves backwards.mediumWrittenExplain to unlock#hash-map#sliding-window#strings25 min
- Merge overlapping intervalsSorting by start, then one pass. Most of the marks are in how you define "overlapping".mediumWritten#greedy#intervals#sorting20 min
- Kth largest in a streamA min-heap of size k. The counter-intuitive part is that you keep the *smallest* elements at the top.mediumWritten#heap#streaming#top-k20 min
- Search a rotated sorted arrayBinary search where one half is always still sorted. Finding which half is the entire question.mediumWrittenExplain to unlock#arrays#binary-search25 min
- Design an LRU cacheO(1) get and put. Then the follow-up nobody prepares for: make it thread-safe.mediumWrittenExplain to unlock#caching#concurrency#data-structures30 min
- The loop that should be fast and is notSumming a matrix column-by-column instead of row-by-row. A test of whether you think about memory at all.mediumWrittenExplain to unlock#c++#cache#memory20 min
- Why did my counter get slower with more threads?Eight threads, eight separate counters, no locks — and throughput falls off a cliff. This is the question that finds out whether you know what a cache line is.mediumWrittenExplain to unlock#c++#cache#concurrency20 min
- When is an atomic not enough?Everyone can say "an atomic is lock-free and cheaper". The question is what a mutex gives you that a pile of atomics does not.mediumWrittenExplain to unlock#atomics#c++#concurrency15 min
- What does memory_order_relaxed actually guarantee?The question that separates people who have used atomics from people who understand them.hardWrittenExplain to unlock#atomics#c++#concurrency25 min
- Was double-checked locking ever actually broken?A famous bug, a famous fix, and a much simpler answer almost nobody gives.hardWrittenExplain to unlock#c++#concurrency#memory-model20 min
- Bounded producer-consumer queueCondition variables, and the two mistakes almost everyone makes: waiting without a predicate, and signalling with the lock held.mediumWrittenExplain to unlock#c++#concurrency#condition-variable25 min