4 Coding Interview Mistakes That Get You Rejected Even When Your Code Works

May 22, 20268 min read
interview-prepdsaleetcodecareer
4 Coding Interview Mistakes That Get You Rejected Even When Your Code Works
TL;DR
  • Coding in silence is the fastest way to fail: interviewers score your reasoning, not just your output, and they can't score what they can't hear
  • Google's rubric assigns 1–4 points for communication, so a correct silent solution can still earn a no-hire
  • Stress-test before you declare done: empty input, single element, negatives, and overflow edge cases are a graded dimension, not optional cleanup
  • Pattern fluency beats grinding: understanding why a sliding window works lets you adapt to twists; memorizing 400 solutions doesn't
  • Brute force before optimal, every time: a complete O(n²) solution scores higher than an unfinished clever one
  • Pacing is a skill: 5 min clarify, 10 min approach, 25 min code, 5 min test. No working code by minute 30 and the interview is effectively over

You got the right answer. You wrote the code. It ran. Then the recruiter emailed you a rejection and you sat there refreshing it three times hoping the answer would change.

This happens constantly. Most engineers who fail DSA interviews didn't fail because they couldn't solve the problem. They made coding interview mistakes that violated the rubric the interviewer was scoring against, the one nobody showed them. FAANG and most mid-to-large tech companies evaluate candidates across four explicit dimensions: communication, problem solving, technical competency, and testing. Get the algorithm right but bomb three of those four, and you're a no-hire.

Yes, you can write an O(n) solution that actually works and still fail. The rubric does not care about your feelings.

Four Coding Interview Mistakes the Rubric Actually Scores


Mistake 1: Coding in Silence

You start typing the moment you understand the problem. You think you're showing confidence. The interviewer thinks you've been abducted.

Silence is a black box. The interviewer cannot see what you're thinking. From their side of the table, a candidate who goes quiet and types for ten minutes looks identical to a candidate who is completely lost. Two engineers with the same correct solution can score very differently: the one who narrated their reasoning gets credit for the process; the silent one gets credit only for the output. And when you go quiet, interviewers start wondering if you actually understand the problem or just pattern-matched to a memorized solution. They can't give you a nudge if they don't know where you are. The silence costs you hints.

This isn't just vibes. Google's evaluation rubric explicitly scores communication: interviewers assign 1 to 4 points for whether you articulate your thinking, make your approach clear before coding, and explain your decisions as you go. A score of 1 means "I had extreme difficulty following the candidate's thought process." Candidates who code silently for most of a 45-minute interview don't have enough time to recover, and they often get no-hired despite a working solution.

The fix is simple. Just narrate. Before you write a line of code, say your approach out loud: "I'm thinking I can use a hash map to track seen values, which gets me to O(n) time. Let me check the edge cases first." When you start typing, keep talking: "I'm initializing left to zero here because..." You don't need to be eloquent. You need to be audible.

Silence is fine for thirty seconds if you explicitly signal it: "Let me think about this for a moment." That turns dead air into visible thinking. Without the signal, the interviewer assumes you're stuck. Maybe you are. Now at least they know why.

A tweet from Jens Ravens saying he got rejected for not understanding an iOS library he actually wrote

Got rejected for "not understanding" a library he wrote. Communication is a skill, apparently.


Mistake 2: Submitting Without Stress-Testing

You finish the code, look at it, and declare it correct. The interviewer asks: "What happens if the input is empty?" The solution breaks. This moment kills more interview performances than any algorithmic gap.

Most candidates test the happy path and nothing else. They trace through the example from the problem statement, confirm it returns the right value, and stop. That's confirmation bias with extra steps. Under interview pressure, your working memory is juggling the problem, the algorithm, the code, the clock, and the fact that someone is watching you breathe. Spotting edge cases requires the broad, relaxed attention that pressure destroys. You'll miss things you'd catch instantly at your desk.

So build a checklist and run it every time, before you write the first line:

- Empty input / null input
- Single element
- All elements the same
- Negative numbers or zero if numeric
- Maximum size inputs (overflow? O(n²) TLE?)
- Unsorted input if you assumed sorted

After coding, dry-run your solution on the smallest breaking case you can construct, not the example from the problem. Walk through it line by line with a variable table. Off-by-one errors live in the last loop iteration. Trace it explicitly.

Then, without being prompted, state your complexity. "This is O(n) time and O(1) space because the hash map is bounded by the alphabet size, not the input." Interviewers notice when candidates proactively analyze complexity. They really notice when candidates don't.


Mistake 3: Grinding Problems Instead of Patterns

You've solved 400 LeetCode problems. You sit down in the interview and draw a blank on something you've seen before. You recognize the shape but can't reconstruct the logic under pressure. This is the most demoralizing failure mode, and it's entirely predictable.

Shooting star meme: guy watches a shooting star pass by with the text 'I wish I could ace the interview without grinding LeetCode'

The star keeps moving.

Solving problems and building pattern fluency are different skills. Grinding hundreds of questions mostly builds the first one. You get better at solving specific problems you've encountered before. But FAANG interviews deliberately introduce small twists. "Find the k-th largest element" becomes "find the k-th largest in a stream." If you memorized the first solution you can't adapt. If you understand the heap pattern you can construct both from scratch.

The vast majority of coding interview questions are variations of about a dozen core patterns. Sliding window. Two pointers. Fast/slow pointers. Merge intervals. Binary search on answer space. BFS/DFS with a visited set. Monotonic stack. Heap for top-k. Dynamic programming on subproblems. Union-find.

Pattern fluency means you look at a problem and immediately think "this smells like a sliding window" or "we need the next greater element, that's a monotonic stack." You know why those approaches work, not just that they work.

The second failure is preparation method. Candidates read solutions on LeetCode, think they understand them, and move on. That's passive learning. Active learning means closing the tab and reconstructing the solution from scratch, explaining your reasoning out loud as you go, then checking against the reference. If you can't narrate your way through a solution you "know," you don't know it well enough for an interview. The whole point of talking through it is that narrating your thinking reveals gaps that re-reading never does.

This is the preparation gap that SpaceComplexity is built to close. Realistic voice-based mock interviews force you to verbalize your reasoning under pressure, which is exactly the condition that exposes whether you have pattern fluency or just pattern familiarity.


Mistake 4: Chasing Optimal Before You Have Working

You know the O(n²) brute force. You also sense a better solution exists. Instead of coding the brute force, you spend twenty minutes hunting the optimal approach, get nowhere, and end the interview with no working code at all.

An incomplete optimal solution scores worse than a complete brute force. Every time. A brute force you can actually trace through, test, and discuss is worth more to an interviewer than a clever idea you couldn't finish. One of the explicit dimensions on every rubric is whether you produced something testable. You cannot test pseudocode.

There's another reason brute force first is the right move. You often don't fully understand the problem until you try to code it naively. Reaching for optimization before you understand the input-output relationship leads to subtle bugs, wrong data structures, and compounding confusion. Candidates who skip brute force frequently build solutions with the wrong output shape. They discover this when they try to test, and by then there's five minutes left.

The correct sequence is:

  1. State the brute force: "Naively I'd use two nested loops, O(n²) time."
  2. Ask if you should implement it or skip to the optimized version.
  3. If time allows, discuss the optimization before coding it: "I can eliminate the inner loop by using a hash map to store complements."
  4. Code the approach the interviewer confirms.

This sequence signals exactly what interviewers want to see: systematic thinking, trade-off awareness, and collaborative problem-solving. It's also much faster. Discussing an approach takes two minutes. Going down the wrong implementation path costs ten.

Time management matters here. A rough pacing guide for a 45-minute interview: five minutes on clarification, ten minutes on approach discussion, twenty-five minutes coding, five minutes testing. If you hit the 30-minute mark with no working code, the interview is gone. A working brute force by minute 25 with time left to optimize beats a half-finished optimal solution every time.


If you want to practice all four of these skills at once, the environment you practice in has to match the environment you'll be tested in. Reading articles and solving problems alone doesn't build the muscle for thinking out loud under pressure. That takes repetition in a realistic setting. Try a mock interview at SpaceComplexity to put these fixes into practice against something that actually talks back.

Further reading

For more on developing the systematic thinking these interviews test, see Dynamic Programming Is Just Recursion With a Memory and Nested Loops Will Cost You the Offer.