A candidate finishes the problem in four minutes, produces the expected output, and leans back. Then the interviewer changes one constraint, and the room goes quiet. That's the most common pattern in technical screens, on both sides of the table. The code passed every test. The explanation fell apart.
Nobody memorizes their way into a hire. Interviewers score how you move from the brute-force idea to the optimized one, how you handle the empty input and the duplicate key, and how clearly you explain what you gave up to get the faster version. A coding interview is a code review with a timer, and you're being judged on the review.
The ten problems below cover the patterns that appear most often, from hash maps and sliding windows to pointer work, dynamic programming, and grid traversal. For each one you'll get what the interviewer is scoring, the core technique, the follow-up that usually decides the outcome, and the failure mode that sinks otherwise strong candidates. One thing has shifted since these lists were first written: Interview Query's AI interview trends report tracks that AI- and LLM-related interview questions have tripled since 2023, with companies adding screen-shared, AI-assisted exercises. That raises the bar on the follow-up rather than lowering it, which is why every item below spends its time on the second question, not the first.
1. PracHub
A list of best coding interview questions assembled from blog posts tells you which patterns exist. It doesn't tell you what a specific company asked last month, or what the interviewer was scoring when they asked it. PracHub collects candidate-reported questions from many companies and rebuilds them as structured practice material, tagged by company, role, category, and difficulty, each paired with a solution write-up that documents the trade-offs and the likely follow-ups. It also includes browser-based practice tools with AI-assisted sessions, so the gap between reading a question and writing code against it shrinks to one tab.
What the platform actually fixes
The gap it addresses is well documented. HackerRank's 2025 Developer Skills Report, based on 13,732 developers across 102 countries, found that 78% believe hiring assessments do not align with real-world tasks, and 56% consider algorithm-based questions irrelevant to their jobs. A bank built from questions people faced closes part of that distance, because it shows the shape of a real loop rather than a synthetic set someone invented years ago.
You stop guessing what the loop looks like. That changes how you spend your evenings.
Where it earns a place in your preparation
- Company and role targeting: Two weeks out from a specific loop, broad pattern grinding wastes time. Filtering by company and role narrows the surface to what that team screens for, so a candidate headed into a backend loop at one company isn't drilling the same set as someone facing a frontend screen elsewhere.
- Evaluation criteria in the write-ups: Each solution notes what interviewers tend to score and which follow-ups they push toward. That's the part most question lists skip entirely, and it's the part that decides offers, since the follow-up is where memorized answers collapse.
- Practice in the browser: The built-in coding console and AI-assisted sessions let you write and test code next to the question instead of pasting into a separate editor, which matters because explaining your reasoning out loud while typing is a different skill from solving on your own.
- Freshness tags: Each question carries the last-reported date and role context. Check the date before you spend an evening on it, because a question reported two years ago may have rotated out of the loop entirely.
Where it falls short
Crowdsourced data is uneven. Some entries are reconstructed loosely, some report a question from a loop that has since changed, and oddball questions get reported far more often than the routine ones that make up most interviews. Treat the write-ups as evidence of what happened, not as the official rubric. No question bank replaces writing code under a timer while someone watches you.
When it's the right choice
Use PracHub when your problem is relevance, not volume. You already finish medium problems cleanly, and what you lack is knowledge of the specific loop you're about to enter. It's the wrong first stop if you can't complete a hash-map problem without a hint; build that foundation with the Blind 75 coding interview questions sequence first and come back once the patterns are automatic. The free browsing tier covers enough to test whether the company-specific coverage matches your target list before you pay for a plan.
2. Two Sum
Two Sum compresses an entire interview into five minutes. You get an array, a target, and one unstated question: can you trade memory for speed without being told to?
It's the cleanest test of whether hash-table lookup is a reflex or a rehearsed answer. Brute force checks every pair in O(n²). The one-pass solution keeps a map from value to index and checks whether the complement has already been seen, giving O(n) time and O(n) extra space.
- What the interviewer is scoring: whether you name the trade-off before writing code. Say you can hit O(n) if you spend O(n) memory, and you've cleared the bar most candidates miss.
- The follow-up that decides it: the array is sorted now. That's a two-pointer sweep with O(1) extra space, and strong candidates pivot without complaining about the work they just threw away.
- The common failure mode: the memorized version. Code lands in ninety seconds, then "return all unique pairs" or "what if the target appears in duplicate pairs" produces a blank stare.
Practical hint: check for the complement first, then insert the current value. Insert first, and an array like [2, 2] with target 4 lets an element match itself.
Every version of this question is the same arithmetic underneath, one number asking whether its partner already exists.

3. Reverse a Linked List
Reversing a list is three assignments inside a loop, and nearly every failure comes from doing them in the wrong order.
The walk you have to explain
Start with prev null and cur at the head. Save cur.next into a temporary, point cur.next at prev, then advance prev to cur and cur to the temporary. Return prev, which is the new head. O(n) time, O(1) space. The recursive version is shorter and worth mentioning only if you can explain the call-stack cost without being prompted.
- What the interviewer is scoring: pointer discipline, plus whether you check the empty list and the single node before writing code rather than after.
- The follow-up that decides it: reverse between positions m and n, or reverse in groups of k. Both punish anyone who memorized a loop without understanding the invariant holding it together.
- The common failure mode: overwriting cur.next before saving it. The rest of the list disappears, and the interview turns into a debugging session with no debugger and no stack trace.
Draw three boxes, label them prev, cur, and next, and walk the loop on paper before you type. It takes forty seconds and prevents the failure.
4. Valid Parentheses
This is a stack question on the surface and an invalid-input question in practice. Everyone returns true for "()". Not everyone returns false for "(" or "())".
- What the interviewer is scoring: whether you treat malformed input as the main case or an afterthought. The happy path takes thirty seconds, so the remaining signal all lives in the edge cases.
- The core technique: push openers onto a stack. On a closer, compare it against the top, pop, and continue. After the string is exhausted, the stack must be empty. O(n) time and O(n) space.
- The follow-up that decides it: return the index of the first offending character, or extend the parser to handle quoted strings where brackets carry no meaning.
- The common failure mode: popping an empty stack when a lone closing bracket appears, which throws instead of returning false in most languages.
Write your three checks before touching the code: empty stack on a closer, mismatched top, and a non-empty stack at the end. Candidates who list those three aloud rarely fail the question, because they've converted a puzzle into a test plan. The same discipline transfers to expression parsers and config validators, which is why interviewers keep asking it.
5. Longest Substring Without Repeating Characters
This is the first reusable pattern on the list. Sliding windows show up in rate limiters, log deduplication, and streaming joins long after the interview ends.
Where the scored signal lives
Two pointers move in one direction, with a map recording the last index where each character appeared. Expand the right edge, and when a repeat shows up, jump the left edge to the larger of its current position and the previous occurrence plus one. O(n) time, one pass.
- What the interviewer is scoring: whether you build the window incrementally instead of re-checking every substring, and whether you can get from the O(n²) version to the O(n) one out loud.
- The follow-up that decides it: at most k distinct characters, which swaps the last-index map for a count map and changes when the left edge moves. Minimum window substring is the harder sibling.
- The common failure mode: off-by-one errors at the left boundary, or dragging the left pointer backward into territory it already passed, which inflates the answer.
Compare the window length against the best so far on every iteration, not at the end. Candidates who only measure at the end tend to lose the case where the longest run finishes at the final character.
6. Merge Intervals
In a HackerRank developer-community survey with more than 80,000 responses, 65% of respondents wanted more real-world questions, and 34% said question quality affected their decision to accept an offer, according to HackerRank's candidate research on interview design. Merge Intervals is the closest thing on this list to actual work, since every calendar tool, video pipeline, and shift scheduler solves it in some form.
Sorting first is the whole insight
Sort by start time, then make a single linear pass. Extend the current interval when the next start is less than or equal to the current end; otherwise flush the current one and start fresh. O(n log n) time, dominated by the sort.
- What the interviewer is scoring: whether you recognize sorting as preprocessing that removes the nested comparison. Pairwise merging without sorting is O(n²) and usually wrong once intervals chain together.
- The follow-up that decides it: insert a new interval into an already merged list, or the minimum meeting rooms variant, which reuses the same endpoints to answer a different question.
- The common failure mode: not asking whether touching intervals like [1,2] and [2,3] merge, then guessing and failing the test that checks it.
Ask the boundary question in the first thirty seconds, before you write anything. Mutability matters too: say whether you're allowed to reorder the input or need to return a new collection. Those two clarifications cost nothing and prevent a rewrite.
7. Number of Islands
The grid looks like a matrix until you're asked to count connected regions, at which point it's a graph with four edges per node. This question tests whether that reframe happens on its own.
The flood fill you have to justify
Scan the grid; each unvisited land cell starts a traversal, increments the count, and marks the whole connected region visited. DFS with an explicit stack or BFS with a queue both work, running in O(m × n) time.
- What the interviewer is scoring: whether you spot the implicit graph and whether you volunteer the recursion depth risk before you're asked about it.
- The follow-up that decides it: largest island, which returns the maximum area from the same traversal, or a count of distinct island shapes, which requires a normalized signature for each region.
- The common failure mode: recursive DFS overflowing the stack on a large grid with no iterative fallback ready, or forgetting to mark visited before recursing and looping forever.
State the depth concern out loud and offer BFS as the safer default. That single sentence reads as production instinct, and interviewers remember it more than they remember whether you used a queue.

8. LRU Cache
Design a cache where get and put both run in O(1). It's the bridge between algorithm rounds and system design, and it's also the question where the interviewer's process matters as much as your answer. A 2022 meta-analytic reanalysis summarized in One Hour's roundup of technical interview statistics places structured interviews at approximately r = 0.42 for predicting job performance, ahead of job-knowledge tests at r = 0.40 and work-sample assessments at r = 0.33. The practical reading for anyone running this question is that a fixed prompt, timebox, follow-up sequence, and scoring anchors across every candidate produce better data than picking a harder cache problem.
- What the interviewer is scoring: whether you can combine two structures to hit a stated performance requirement, and whether you narrate the design before typing sixty lines of code.
- The core technique: a hash map from key to node, plus a doubly linked list for recency. A get moves the node to the front; a put inserts at the front and evicts from the tail when capacity is exceeded.
- The follow-up that decides it: add a TTL so entries expire independently of recency, or make the structure safe for concurrent readers.
- The common failure mode: spending twelve minutes on a Node class and never testing eviction. Language shortcuts such as an ordered dictionary finish in two minutes and prove little; if you use one, explain what sits underneath it.
9. Trapping Rain Water
The hard problem on the list, and the best test of whether a candidate can hold an invariant under pressure.
Water above a bar equals the lower of the tallest bars to its left and right, minus its own height. Prefix and suffix maximum arrays express that directly in O(n) time and O(n) space, which is the right first answer. The two-pointer version reaches O(1) extra space by tracking leftMax and rightMax and always moving the smaller side inward.
- What the interviewer is scoring: whether you can justify why moving the smaller side is safe, not just that it works. The bound on that side is final because the opposite side is at least as tall.
- The follow-up that decides it: return the volume per bar rather than the total, or the two-dimensional grid version, which changes the problem into a priority queue.
- The common failure mode: reaching the two-pointer solution with a hint and then going silent when asked to prove the invariant.
Add the volume at the pointer you move, and sanity-check on a three-bar case like [2,0,2] before trusting your loop. Small hand checks catch inverted comparisons faster than reading your own code.
10. Coin Change
Greedy looks correct and isn't. Take coins of 1, 3, and 4 for an amount of 6. Greedy grabs 4, then 1, then 1 and returns three coins; the optimum is 3 and 3. That counterexample is the entire question.
The bottom-up solution builds a table indexed by amount, with zero coins for amount zero and a sentinel meaning unreachable for everything else. Each amount tries every denomination and keeps the minimum of the current value and the best result for the remainder. Runtime is O(amount × number of coins).
The counterexample to memorize: 1, 3, and 4 for amount 6. Anyone who claims greedy works gets dismantled in one line.
- What the interviewer is scoring: whether you disprove greedy with a concrete case instead of assuming it works, and whether you can explain the sentinel and why unreachable amounts stay unreachable.
- The follow-up that decides it: count the number of combinations rather than the minimum coins, which is a different recurrence and a different ordering problem.
- The common failure mode: shipping the greedy solution, or failing to explain the pseudo-polynomial runtime when asked how the approach scales.

11. Binary Tree Level Order Traversal
The calmest question on the list, and the one where a single missing line breaks everything.
The detail that gets scored
Breadth-first search with a queue, but capture the queue length before each level loop and iterate exactly that many times. That snapshot is the boundary between levels, and it's the thing interviewers listen for.
- What the interviewer is scoring: whether you understand why the snapshot exists, not merely that BFS uses a queue. That distinction separates recall from comprehension.
- The follow-up that decides it: zigzag order, right-side view, or average value per level. All three reuse the loop and change only what you append.
- The common failure mode: iterating until the queue empties without the size snapshot, which mixes the next level into the current one, or skipping the empty-tree return entirely.
Write the loop as while queue, then read level size, then a for loop over that range. The boundary bug disappears, and the follow-ups become edits rather than rewrites.
How the 10 Coding Interview Questions Compare
Interviewers score the family you reach for. Hash and window problems are a single pass. Pointer and stack problems are scored on extra memory. Merge intervals pays for a sort. Islands and level order are graph walks. LRU Cache is a design constraint. Coin change is dynamic programming, and its follow-up exists to break a greedy shortcut.
| Item | Core Technique | Time Complexity | LeetCode Reference | Common Follow-up |
|---|---|---|---|---|
| Two Sum | One-pass hash map lookup for each value's complement | O(n) time, O(n) space | #1 | Return all unique pairs or handle duplicates |
| Reverse a Linked List | Iterative pointer reversal using previous, current, and next | O(n) time, O(1) space | #206 | Reverse nodes in groups of k |
| Valid Parentheses | Stack matching of opening and closing brackets | O(n) time, O(n) space | #20 | Extend validation to nested structures |
| Longest Substring Without Repeating Characters | Sliding window with last-seen character positions | O(n) time | #3 | Find the longest substring with at most k distinct characters |
| Merge Intervals | Sort by start time, then merge overlapping intervals | O(n log n) time | #56 | Insert an interval or find the minimum meeting rooms |
| Number of Islands | DFS or BFS flood fill on an implicit grid graph | O(m × n) time | #200 | Handle dynamic land additions with union-find |
| LRU Cache | Hash map plus doubly linked list for constant-time lookup and recency updates | O(1) average time for get and put | #146 | Compare LRU with LFU eviction |
| Trapping Rain Water | Two pointers tracking the maximum height from each side | O(n) time, O(1) space | #42 | Explain the prefix-and-suffix maximum approach |
| Coin Change | Bottom-up dynamic programming over target amounts and coin denominations | O(amount × number of coins) time | #322 | Show why a greedy strategy can fail |
| Binary Tree Level Order Traversal | Breadth-first search using a queue, processing one level at a time | O(n) time | #102 | Implement zigzag traversal |
Turn Practice Into Reasoning You Can Explain Under Pressure
Pick three problems from different families this week: one hashing problem, one linked structure, one dynamic programming. Solve each twice. The first pass is timed and silent, aimed at a correct solution inside your limit. The second pass has no code at all. Write the invariant in one sentence, the complexity in two, and one follow-up answer you can deliver without looking anything up. If you can't write the invariant, you didn't solve the problem, you solved one instance of it.
A defensible second pass looks like this:
- The invariant in plain words: "Everything left of the pointer is already merged and sorted," or "the window never contains a duplicate." One sentence, no jargon from a solution thread.
- The complexity with a reason: O(n) because each element enters and leaves the window once. Not O(n log n) because the sort dominates. State the reason, not the letters.
- One follow-up you own: the sorted-input variant, the k-distinct variant, the recursion-limit answer. Choose the one that appears most in your target company's reports.
Narrate each decision aloud while you practice, and record it once. Transcribing your own explanation exposes the places where you said "and then it just works" instead of naming the invariant. Most candidates who fail a follow-up fail it in that gap, not in the code.
Practice the AI-permitted format too, because it's now part of real loops. Solve one problem with no tools, then solve the next one with an assistant and supervise it: check the generated function against edge cases, catch a hallucinated API, explain the trade-off you accepted, and note how you'd disclose the prompt. The skill being scored there is judgment about the output, not the speed of producing it.
Start this week with the hashing problem you already know, and write its invariant before you write its code. If you want the AI-era half of this preparation, our guides and tutorials walk through evaluating generated code, checking APIs against real documentation, and deciding when a tool shouldn't be used at all. Our free daily AI briefing newsletter also keeps you current on the model and tooling changes that keep showing up in interview loops, and you can unsubscribe at any time. Pick your three problems, run both passes, and by next week the second question will feel like the easier one.
Sources (5)
- 01interviewquery.comInterview Query's AI interview trends report (opens in a new tab)
- 02hackerrank.com2025 Developer Skills Report (opens in a new tab)
- 03prachub.comBlind 75 coding interview questions (opens in a new tab)
- 04d3bql97l1ytoxn.cloudfront.netHackerRank's candidate research on interview design (opens in a new tab)
- 05onehour.digitalOne Hour's roundup of technical interview statistics (opens in a new tab)