Question Bank
Every question, one list
Sandboxed coding rounds that run against a hidden test suite, and written questions graded against a rubric — side by side, because when you are drilling a topic you want both.
Topicimplementation (105)system-design (24)hld (20)trees (11)distributed-systems (10)arrays-hashing (9)concurrency (9)graphs (9)binary-search (8)consistency (8)dp-1d (8)linked-list (8)reliability (8)storage (8)
Clear filters72 questions · browse by bank instead
- 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
- Auth Middleware Bugroute admin vô tình public.mediumWritten30 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
- Circuit BreakerDesign a circuit breaker that protects your service from repeatedly calling a failing downstream dependency. Explain the states it moves through and what triggers each transition.mediumWritten30 min
- Connection PoolExplain why a service uses a connection pool for its database connections instead of opening a new connection for every request, and what happens when a request arrives and the pool is fully checked out.mediumWritten30 min
- CORS MysteryPostman chạy nhưng browser fail.mediumWritten30 min
- Design a notification serviceDelivery guarantees when every downstream provider is someone else and fails.mediumWrittenExplain to unlock#hld#queues#reliability45 min
- Design a rate limiterSmall surface, deep follow-ups. The distributed counter race is the real question.mediumWrittenExplain to unlock#concurrency#hld#reliability45 min
- Design a retry policyRetries are the most common way a small outage becomes a large one.mediumWritten#distributed-systems#lld#reliability25 min
- Design a text-sharing serviceA warm-up that turns into a storage question the moment you ask where the body lives.mediumWrittenExplain to unlock#caching#hld#storage45 min
- Design a URL shortenerThe read-heavy canonical. Key generation, cache hit rate, and what a 301 costs you.mediumWrittenExplain to unlock#caching#hld#storage45 min
- Design a URL shortenerThe standard opener. Easy to answer adequately, and the follow-ups are where it is actually decided.mediumWritten#caching#storage#system-design45 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
- Design notification fan-outPush vs pull, and the celebrity problem that makes the obvious answer fail.mediumWritten#fan-out#queues#system-design40 min
- Design search autocompleteLatency is the requirement, so almost everything must be precomputed.mediumWrittenExplain to unlock#caching#data-structures#hld45 min
- Find the gapsGaps and islands. Once you have seen the trick it is easy, and the trick is worth knowing.mediumWritten#gaps-and-islands#sql#window-functions20 min
- Flaky Clock Testremove dependency vào current time.mediumWritten30 min
- Idempotent Payment APIretry không tạo hai payment.mediumWritten30 min
- Index Zero Doesn't Existsearch tìm thấy item ở index 0 nhưng code báo "not found".mediumWritten30 min
- Infinite Retryretry loop không increment counter trong một branch.mediumWritten30 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
- Last Item Missingpagination không bao giờ trả item cuối cùng.mediumWritten30 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
- LRU CacheDesign an LRU (Least Recently Used) cache with O(1) get and put operations. Explain the data structures you'd use and why, and what happens on a cache hit vs. a cache miss when the cache is full.mediumWritten30 min
- Merge overlapping intervalsSorting by start, then one pass. Most of the marks are in how you define "overlapping".mediumWritten#greedy#intervals#sorting20 min
- Mocking Too Muchtest xanh nhưng production hỏng.mediumWritten30 min
- Mutable Default Nightmarehai users vô tình share cùng một Python list.mediumWritten30 min
- N+1 Profile Page101 queries cho 100 users.mediumWritten30 min
- Priority Job QueueDesign a job queue where higher-priority jobs are processed before lower-priority ones, even if the lower-priority jobs were submitted first. Explain the data structure you'd use and how priority is used.mediumWritten30 min
- Retry with Exponential Backoff + JitterExplain why a retry mechanism should use exponential backoff with jitter instead of retrying immediately or at a fixed interval, especially when many clients might be retrying the same failing dependency at once.mediumWritten30 min
- Running total per accountWindow functions. The frame clause is the part people get wrong without noticing.mediumWritten#sql#window-functions20 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
- Take-home: a rate-limited APIFour hours. The brief is under-specified on purpose — decide, and write down why.mediumWritten#api-design#rate-limiting#take-home240 min
- Tell me about a time you broke productionThe failure story. Candidates sabotage this one by picking a failure that was not really theirs.mediumWritten#behavioral#failure#ownership30 min
- Tell me about a time you disagreed with a decisionTests whether you can disagree without being difficult, and commit without being a pushover.mediumWritten#behavioral#conflict#star30 min
- Tell me about the most ambiguous problem you have worked onTests whether you can make progress without being told what to do.mediumWritten#ambiguity#behavioral#star30 min
- The Exception Nobody Seescatch quá rộng rồi swallow error.mediumWritten30 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
- The Missing CustomersINNER JOIN làm biến mất customer chưa có order.mediumWritten30 min
- The Stale CacheDB update thành công nhưng cache vẫn trả object cũ.mediumWritten30 min
- The stale closureAn interval that always logs 0. The most common React bug, and a good test of whether you understand renders or just hooks.mediumWritten#closures#javascript#react20 min
- Token Bucket Rate LimiterDesign a token bucket rate limiter that allows an average of N requests per second but tolerates short bursts. Explain how tokens are added and consumed, and what happens when a request arrives with no tokens available.mediumWritten30 min
- Users Who Never Logged Inanti-join đúng cách.mediumWritten30 min
- Versioning an API you cannot take downThe right answer starts by questioning whether you need a new version at all.mediumWritten#api-design#rest#versioning25 min
- What does idempotent actually mean?Everyone can list which verbs are idempotent. Far fewer can make a payment endpoint safe to retry.mediumWrittenExplain to unlock#api-design#reliability#rest20 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
- 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
- Design a chat serviceConnection state is the real problem, and ordering is per-conversation, never global.hardWrittenExplain to unlock#consistency#distributed-systems#hld45 min
- Design a collaborative document editorThe hardest consistency question on the list. OT versus CRDT, honestly.hardWrittenExplain to unlock#consistency#distributed-systems#hld45 min
- Design a distributed job schedulerLeader election and at-least-once done properly, with dependencies.hardWrittenExplain to unlock#distributed-systems#hld#reliability45 min
- Design a distributed key-value storeThe question that tests whether you know CAP for real rather than as a slogan.hardWrittenExplain to unlock#consistency#distributed-systems#hld45 min
- Design a distributed rate limiterChoosing the algorithm is half of it. The other half is what happens when the limiter itself fails.hardWritten#distributed-systems#rate-limiting#system-design45 min
- Design a file sync serviceBandwidth is the constraint, and two offline devices editing the same file is the hard case.hardWrittenExplain to unlock#consistency#hld#storage45 min
- Design a limit order bookThe canonical quant LLD question. Choosing the data structure is where it is won or lost.hardWrittenExplain to unlock#data-structures#lld#low-latency45 min
- Design a market data distribution systemWhere the usual system-design answers stop working: microseconds matter, and dropping data can be correct.hardWritten#lock-free#low-latency#market-data50 min
- Design a metrics and monitoring systemWrite-heavy, and cardinality is what actually kills these systems.hardWrittenExplain to unlock#hld#reliability#storage45 min
- Design a news feedThe fanout question, and the most-asked design round in the industry.hardWrittenExplain to unlock#caching#distributed-systems#hld45 min
- Design a payment system and ledgerCorrectness over throughput. Money makes every shortcut visible.hardWrittenExplain to unlock#consistency#hld#reliability45 min
- Design a post and follow-graph serviceFeed seen from the write path: id generation, the follow graph, and hot keys.hardWrittenExplain to unlock#consistency#distributed-systems#hld45 min
- Design a ride-matching serviceGeospatial search plus a very high write rate of location updates.hardWrittenExplain to unlock#distributed-systems#hld#storage45 min
- Design a ticket booking systemInventory correctness under a thundering herd. Overselling is the failure to design against.hardWrittenExplain to unlock#concurrency#consistency#hld45 min
- Design a video streaming serviceA job pipeline wearing a product costume, plus the economics of delivery.hardWrittenExplain to unlock#caching#hld#queues45 min
- Design a web crawlerThe politeness question. Dedup at billions of URLs is where the naive answer breaks.hardWrittenExplain to unlock#distributed-systems#hld#storage45 min
- Design an ad click aggregation pipelineThe streaming-correctness question. Late events and duplicates decide the round.hardWrittenExplain to unlock#consistency#hld#queues45 min
- Design an object storage serviceDurability arithmetic, and the metadata service that is the real bottleneck.hardWrittenExplain to unlock#hld#reliability#storage45 min
- Fewest machines to finish by a deadlineBinary search on the answer. Recognising that the question is monotonic is the whole insight.hardWrittenExplain to unlock#binary-search#greedy#optimisation30 min
- Take-home: trade reconciliationTwo files that should agree and do not. A quant-flavoured brief where the edge cases are the whole exercise.hardWritten#correctness#data#take-home300 min
- The ABA problemYour compare-and-swap succeeded. That does not mean nothing happened.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
- 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
- What is the hardest technical problem you have solved?Half behavioral, half technical depth. The follow-ups go deep, so pick something you genuinely understand.hardWritten#behavioral#star#technical-depth30 min
- Why is this query slow?An index exists and is not being used. This question is about whether you read plans or guess.hardWritten#indexing#performance#query-planning30 min