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 filters37 questions · browse by bank instead
- Alien DictionaryWrite `alien_order(words)` returning a letter order consistent with the given sorted word list, or `""` if none exists. Any valid order is accepted. ["wrt","wrf","er","ett","rftt"] -> "wertf" hardCoderpad#advanced-graphs#implementation
- Binary Tree Maximum Path SumWrite `max_path_sum(root)` returning the largest sum along any path between two nodes. The path follows parent-child edges, need not touch the root, and must contain at least one node. Values may be nhardCoderpad#implementation#trees
- 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
- Find Median from Data StreamImplement `MedianFinder` with `add_num(num)` and `find_median()` returning the median of everything added so far, as a float. Keep a max-heap of the lower half and a min-heap of the upper half. Fix ahardCoderpad#heap#implementation
- Largest Rectangle in HistogramWrite `largest_rectangle_area(heights)` returning the area of the largest rectangle that fits under the histogram. largest_rectangle_area([2, 1, 5, 6, 2, 3]) -> 10 (heights 5 and 6, width 2) hardCoderpad#implementation#stack
- Median of Two Sorted ArraysWrite `find_median_sorted_arrays(a, b)` returning the median of the two ascending arrays combined, as a float. find_median_sorted_arrays([1, 3], [2]) -> 2.0 find_median_sorted_arrays([1,hardCoderpad#binary-search#implementation
- Merge k Sorted ListsWrite `merge_k_lists(lists)` merging `k` ascending linked lists into one and returning its head. The input may contain empty lists. Merging them one at a time into an accumulator is O(n k) — say so, hardCoderpad#implementation#linked-list
- Minimum Window SubstringWrite `min_window(s, t)` returning the shortest substring of `s` containing every character of `t` including duplicates. Return `""` when no such window exists. min_window("ADOBECODEBANC", "ABC")hardCoderpad#implementation#sliding-window
- N-QueensWrite `solve_n_queens(n)` returning every board on which `n` queens share no row, column, or diagonal. Each board is a list of `n` strings using `Q` and `.`. Place one queen per row, so rows never cohardCoderpad#backtracking#implementation
- Serialize and Deserialize Binary TreeImplement `serialize(root)` returning a string, and `deserialize(data)` rebuilding the tree, so that the round trip preserves the tree exactly. Pre-order with an explicit marker for every missing chihardCoderpad#implementation#trees
- Sliding Window MaximumWrite `max_sliding_window(nums, k)` returning the maximum of every contiguous window of width `k`, left to right. max_sliding_window([1,3,-1,-3,5,3,6,7], 3) -> [3, 3, 5, 5, 6, 7] A heap gives hardCoderpad#implementation#sliding-window
- 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
- Trapping Rain WaterWrite `trap(heights)` returning the total units of water trapped between the bars after rain. trap([0,1,0,2,1,0,1,3,2,1,2,1]) -> 6 Water above any bar is `min(max_left, max_right) - height`. PhardCoderpad#implementation#two-pointers
- 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
- Word Search IIWrite `find_words(board, words)` returning every word from the list that can be spelt by walking adjacent cells (up, down, left, right) without reusing a cell in a single word. Return them in any ordehardCoderpad#implementation#tries