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 filters46 questions · browse by bank instead
- 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 standard opener. Easy to answer adequately, and the follow-ups are where it is actually decided.mediumWritten#caching#storage#system-design45 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 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