CCareerClutch
← All posts
·11 min read·Nishant Pandey

What to Do When You Get Stuck in a Technical Interview

interview-preptechnical-interviewcampus-placementscodingfreshers

You're 20 minutes into a coding round. The interviewer gives you a problem. You recognise the general shape of it — maybe it involves a graph, maybe it looks like dynamic programming — but you can't see the solution. A minute passes. Then two. The interviewer is watching.

Most candidates in this moment do one of two things: they panic and freeze, or they start writing code that goes nowhere while hoping something will click. Neither works. The candidates who get offers do something different. They talk.

What the interviewer is actually measuring when you get stuck

There's a widespread assumption among freshers — and even experienced candidates — that technical questions have right answers, and the interviewer is waiting to see if you know them. For some companies, in some rounds, this is partially true. For most senior interviewers at product companies, well-run startups, and the better service-company technical teams, it is not.

The stuck moment is not an accident. Interviewers often calibrate their question to the edge of what a candidate at that level is likely to know. They give you something genuinely hard on purpose — because the hard question reveals what the easy one cannot.

What gets scored when you get stuck:

Problem decomposition. Can you break an unfamiliar problem into smaller parts you do understand? A candidate who recognises "this is a graph problem, and the bottleneck is probably the number of edges" has done something real, even without the full solution.

Communication under uncertainty. Do you articulate what you know, what you don't, and what you're trying? Or do you go quiet and hope?

Response to hints. When the interviewer offers direction, do you take it and move forward, or do you wait to be rescued?

Intellectual honesty. The interviewer knows within 30 seconds whether you know a concept deeply or shallowly. Pretending otherwise is always visible.

An interviewer who has run a hundred technical rounds has seen every performance of "I sort of know this." What they cannot observe — unless you show them — is how you think when the answer is not available. That gap is the interview.

The four-step stuck protocol

When you hit a wall, work through these four steps explicitly, out loud.

1. Say what you recognise, even if it's incomplete. Before trying to solve, name the type of problem. "This looks like it could be a shortest-path problem — I see weighted edges and a destination node." That single sentence tells the interviewer you're orienting, not blanking. It also anchors your own thinking.

2. Restate the constraints and consider what they rule out. "The input size is up to 10^5 nodes, so O(n²) is probably out. And values can be negative, which means standard Dijkstra won't work." Constraint analysis buys you thinking time and shows you reason about correctness, not just code.

3. Start with what you know — even if it's naive. A brute-force approach, correctly described and honestly evaluated, is a real answer. "I can't see the efficient solution immediately, but the brute-force would be to try every possible path. That costs O(2^n) time because of the branching, which won't scale past maybe n=20. Where the inefficiency is coming from is recomputing the same sub-paths repeatedly." A brute-force that names its own failure mode is worth more to an interviewer than silence.

4. Ask for a specific hint, not a rescue. There's a difference between "I don't know what to do, can you help?" and "I've identified that the bottleneck is the repeated subproblems. Is it right to think about this as a DP problem, or is there a different structure here I'm missing?" The second question tells the interviewer exactly where you are and what kind of help moves you forward. Specific questions signal progress. Vague ones signal giving up.

Worked example: SDE — getting stuck on a DP problem

The problem: Find the minimum number of coins to make a target amount from a given set of denominations. You recognise it's DP-flavoured but cannot work out the recurrence.

Weak response:

(30 seconds of silence) "I think this might be dynamic programming." (Another 20 seconds) "I'm not sure how to approach it."

The interviewer now sees a candidate who correctly labelled the category but cannot do anything with that label. After two minutes of silence, most interviewers will give a heavy-handed hint or mark the candidate down and move forward.

Strong response:

"Okay, this is an optimisation problem — I want the minimum coins to hit a target. Brute force would be to try every combination of coins recursively, but that's exponential, and the reason is I'm recomputing the same smaller amounts over and over. That overlap between subproblems is what signals DP to me.

For DP I need a state and a transition. The natural state seems to be the amount still remaining. If I define dp[i] as the minimum coins needed to make amount i, then for each coin c, dp[i] = min(dp[i], dp[i − c] + 1), provided i is at least c. Base case: dp[0] = 0.

Let me trace a small example — coins [1, 5, 6], target 11. dp[0]=0, dp[1]=1, dp[5]=1, dp[6]=1, dp[11]=min(dp[10]+1, dp[6]+1). dp[6]+1 is 2, so the answer is two coins — a five and a six. That looks right.

The one thing I'm less certain about is whether I need to iterate over amounts on the outer loop or coins on the outer loop. I believe amounts-outer gives unbounded knapsack semantics, which is what I want here — each coin can be used multiple times. But I'd double-check that before submitting."

What the strong response does:

  • Names the pattern by reasoning about it, not just recalling the label
  • Derives the recurrence from first principles
  • Traces a small example to verify
  • Flags the one genuine uncertainty, rather than papering over it

That last point matters. Interviewers do not expect perfect recall under pressure. They expect you to know the difference between what you're confident about and what you're guessing.

Worked example: Data — an unfamiliar statistics question

The problem: You're asked in a data science interview why L1 regularisation produces sparse solutions while L2 does not. You know both terms but cannot recall the geometric explanation.

Weak response:

"L1 adds the absolute value of weights to the loss, L2 adds the squared value. L1 gives sparse solutions because it can zero out weights."

Correct but empty. The interviewer follows up: "Can you explain geometrically why L1 creates sparsity?" You draw a blank.

Strong response:

"I know the mechanics — L1 adds the sum of absolute values of weights to the loss, L2 adds the sum of squares. In practice, L1 pushes some coefficients exactly to zero while L2 shrinks everything toward zero without zeroing anything out.

Let me reason through why. In the geometric view, we're minimising a loss subject to a constraint on the weights. L1 constrains the weights to a diamond shape in weight space; L2 constrains them to a sphere. The solution lands where the loss contours first touch the constraint region. The corners of the L1 diamond are the sparse points — where some weights are exactly zero. Loss contours tend to hit corners before they hit the flat sides, so the optimal solution under L1 is more likely to be at a sparse corner. With a sphere there are no corners, so the contours meet a smooth point and no single weight is forced exactly to zero.

I'm not certain I've stated the geometric argument completely, but that's the core intuition I have — the diamond has corners in all the right places and the sphere doesn't."

The interviewer can now probe exactly where the candidate's knowledge ends. The answer is accurate as far as it goes, is honest about its limits, and invites a real dialogue rather than ending in silence.

Before/after: the same stuck moment, two outcomes

Before:

"I'm not sure how to approach this. I've seen something like it before but I can't remember the exact approach right now."

This scores zero. There is no structure, no attempt, and nothing the interviewer can act on to help you.

After:

"Let me think out loud. What I notice immediately is [observation about structure]. That makes me think of [approach or category]. The brute-force would be [approach], which costs [complexity] because [reason] — so it probably won't work at this scale. The part I'm stuck on is [specific gap]. Can I ask — is the direction I should be looking the [X] angle, or is there a different framing that fits better?"

The before answer ends the conversation. The after answer continues it. Almost everything positive that can happen in a technical interview happens through continuation. A partial answer that keeps the dialogue going beats a silent near-miss every time.

Common mistakes — and how to fix each

Mistake 1: Going completely silent. The single most common error. Silence gives the interviewer nothing to work with. Even incorrect narration is more useful — it shows where your thinking is and what kind of hint will help. Make a concrete rule: you will say something out loud within 30 seconds of any hard problem, even if it's just "I'm going to start by identifying the type of problem this is."

Mistake 2: Asking for the answer instead of a specific hint. "Can you give me a hint?" has too many possible responses. "I have the state defined but I'm not sure how to formulate the transition — is there a useful way to think about what changes between adjacent states?" is a question the interviewer can answer in one sentence and that moves you to the next step. The specificity of your question signals how far you've gotten.

Mistake 3: Silently going down a dead end. Many candidates start writing code based on a half-formed idea, hoping it will come together. By line 20, the interviewer has noted that you did not communicate early enough. If you start down a path you're not sure about, say so: "I'm going to try the recursive approach first — I'm not certain this avoids recomputation, so I'll flag that and we can decide whether it needs memoisation."

Mistake 4: Treating a hint as a rescue, then going quiet again. When the interviewer offers direction, the correct move is to integrate it and keep narrating. "If I think about it that way, then the state might be the remaining capacity rather than the number of items. Let me see if that changes the transition..." Taking a hint and then going silent again wastes it. The hint is a signal, not an answer.

Mistake 5: Apologising instead of thinking. "I'm sorry, I should know this" consumes time and signals anxiety, not capability. Replace the apology reflex with action: name what you recognise, attempt a brute-force, define a variable. Apology sounds like giving up. Attempting sounds like someone you would want on your team when a production bug hits at 2am.

What to do this week

Day 1–2. Pick three LeetCode problems you have never seen — one easy, one medium, one hard. Do not look at the solution or hints. Set a timer for ten minutes per problem. Your only goal is to narrate your thinking out loud, not solve it. Record yourself. Count how often you go silent for more than 20 seconds and what triggers it.

Day 3. Write down five starter phrases you will use when stuck in a real interview and say them until they feel natural, not scripted:

  • "Let me start with the brute-force approach..."
  • "What I immediately notice here is..."
  • "The part I'm not confident about is..."
  • "Let me trace through a small example..."
  • "Can I ask — is my instinct about [X] pointing in the right direction?"

Day 4–5. Do a mock with a friend where you are intentionally given a problem neither of you expects you to solve. Tell them explicitly: "Give me something hard and don't expect a solution — I'm practising how to get stuck well." Work through the four-step protocol out loud. Have them note each time you go quiet for more than 20 seconds.

The goal is not to never get stuck. The goal is to get stuck visibly, intelligently, and in a way that keeps the conversation going. That is a learnable habit. The candidates who get offers are not always the ones who knew the answer — they are often the ones who handled not knowing it better than everyone else in the room.


CareerClutch's mock interview rounds simulate the stuck moment by design — if you pause for more than 30 seconds without narrating, the AI prompts you to think out loud. A few rounds with that feedback makes the habit much easier to build before it counts.