Guides · Interview formats and rounds

What to do when you get stuck in a coding interview

2026 · ~8 min read · OfferPilot AI

Being stuck is not what fails you. Going quiet is. The way out is a five-rung ladder climbed in order, where every rung has a sentence you can say before you know the answer: restate the problem in one line, run a tiny input by hand, state the brute force and its Big-O out loud, name the bottleneck, then ask one scoped question. Ninety seconds, start to finish. It works because each rung hands you the cue for the next one, and because nobody can score silence.

The five-rung ladder

Climb in order. The temptation is to jump straight to rung five and ask for help, but a question asked before you have said a brute force out loud reads as surrender rather than progress. The sentences below are the actual words. Swap the nouns, keep the shape.

Restate the problem in one line (about 10 seconds)

Compress it, do not parrot it. "So in one line: given [input], return [output], and I am assuming [constraint]." For a sliding window question that becomes: "So in one line, given an array and a window size k, return the maximum inside each window as it slides, and I am assuming k is never bigger than the array." If your reading is wrong you find out ten seconds in rather than eight minutes in. Either way you are speaking, and the panic loop needs silence to keep running.

Run a smaller input by hand (about 20 seconds)

"Let me take a tiny case and do it by hand, and I will say what my hand is actually doing." Use four or five elements. Two is degenerate and teaches you nothing. The second clause is the entire trick: you are not checking an answer, you are watching your own procedure, because your hand is already running an algorithm you have not written down. Narrate what your eye tracks, what you keep, and what you find yourself ignoring. Most of the time the optimal approach is hiding inside that commentary in plain English.

State the brute force and its Big-O out loud (about 15 seconds)

"The obvious version is [X]. That is O(...) time and O(...) extra space. It is correct, so that is my floor, and now I will try to beat it." Say the complexity even when it is ugly, especially when it is ugly. A brute force you never said out loud scores nothing. The same one with a cost attached is a graded data point and a fallback you can code if the clock runs out. It also flips your internal state from having nothing to having something, which changes how the next sixty seconds go.

Name the bottleneck (about 15 seconds)

"The expensive part is [Y]. Everything else is linear. So the real question is whether I can do [Y] in less than [its current cost]." This rung ends most stuck periods and it is the one people skip. Naming the bottleneck swaps a large open problem for a small closed one, and small closed problems have catalogue answers. Can I test membership faster than a scan? A hash set. Can I get the minimum faster than a scan? A heap. Can I stop recomputing an overlapping range? Prefix sums, a monotonic deque, or memoisation. You are no longer solving the interview question, you are looking up a data structure.

Ask a scoped question (about 10 seconds)

"I am between [A] and [B]. I lean [A] because [reason]. Before I spend ten minutes on it, is that the direction you would take?" A scoped question names two candidates plus your reasoning and asks for a yes or a no. An unscoped one hands the problem back. Interviewers answer scoped questions generously, because you have already done the work that makes the answer cheap to give, and because confirming a direction gives away far less than they fear.

Ninety seconds, transcribed

Here is the ladder run against a question people genuinely freeze on. Given an array and a window size k, return the maximum of every window as it slides. At second zero the candidate has nothing.

ClockSpokenRung, and what it produced
0:00Interviewer finishes reading the problem.Blank. No pattern recognised, no idea where to start.
0:00 to 0:04Silence.Four seconds is free. Do not spend a tenth.
0:04 to 0:14"So in one line, given an array and a window size k, return the max inside each window as it slides. I am assuming k is at least 1 and never bigger than the array."Rung 1. The interviewer confirms. Nothing is solved, but the room is no longer silent and the constraints are pinned down.
0:14 to 0:35"Let me do a tiny case by hand and say what my hand is doing. Array 3, 1, 4, 1, 5, and k is 3. First window is 3, 1, 4, so 4. Slide, 1, 4, 1, so still 4. Slide, 4, 1, 5, so 5. Watching myself do that, I am only really tracking the biggest thing still inside the window, and I only go looking again when the biggest one falls off the left."Rung 2. That last sentence is the monotonic deque invariant, said in English by someone who has not yet thought of a deque.
0:35 to 0:50"The obvious version is, for each of the n minus k plus 1 windows, scan all k elements and take the max. That is O(n * k) time, O(1) extra space, and it is correct. That is my floor."Rung 3. A gradeable answer now exists, plus a fallback to code if the clock wins.
0:50 to 1:05"The expensive part is rescanning k elements per window. But consecutive windows share k minus 1 elements, so I am recomputing a maximum I already knew. The real question is whether I can keep something that reports the max in O(1) and updates in about O(1) as one element enters and one leaves."Rung 4. The problem just shrank from an algorithm to a data structure requirement.
1:05 to 1:20"Two candidates. A size-k heap with lazy deletion, which is O(n log k), or a deque holding indices in decreasing order of value, which I think is O(n) because each index enters and leaves once. I lean deque, and it matches what my hand was doing. Worth going for it, or would you rather see the heap coded?"Rung 5. Two named options, a complexity for each, a stated preference, and a yes or no question.
1:20Interviewer: "Go with the deque."Unstuck, with a confirmed direction, ninety seconds spent.

At 1:05 that candidate still had no solution. What they had was a stated complexity, a named redundancy and two candidate structures, which on most rubrics beats a silent candidate who blurts out "monotonic deque" at 0:30 and then cannot explain why it works. Notice too that rung 4 was not invented at 0:50. It was already sitting in the sentence spoken at 0:30 about the biggest thing still inside the window. That is the ladder doing its actual job: the hand-run produces the bottleneck, and the bottleneck produces the question.

Scoped questions and unscoped ones

Rung 5 fails when the question is lazy. Here is what different asks actually return.

What you sayHow it readsWhat comes back
"I am stuck. Can I get a hint?"The problem is handed back whole, and the interviewer has to decide what to give.Usually the smallest safe nudge, plus a note that you needed one.
"Can I sort the input, or does the original order matter?"A constraint question. Costs nothing at any point in the round.A straight answer, and sometimes it is the whole unlock.
"Am I allowed O(n) extra space, or are you looking for in place?"Scoping the solution space rather than asking for the solution.A direct answer that frequently rules out half the search.
"I have an O(n * k) that works. Is it worth coding, or should I push for the optimal first?"A time-allocation question, which interviewers answer honestly because it is their clock too.A real steer, and it can save ten wasted minutes.
"I am between a heap and a deque, leaning deque because each index enters and leaves once. Same direction as you?"Two candidates, a reason, a yes or no. The strongest form on this table.Almost always a genuine confirmation or a redirection.
"Have you seen this one before? Is it from LeetCode?"Off task. It asks about the problem's provenance instead of the problem.Nothing useful, and a small credibility cost.
"Could I look up the deque API syntax?"Depends entirely on the round. Ask, do not assume it either way.Often yes in a pairing round. Ask before you open a tab, always.

How much silence you actually have

No measured threshold exists here, so treat this as convention rather than fact: about four seconds reads as thinking, ten is the edge, and past roughly twenty the interviewer steps in and starts driving, which is the moment you lose the chance to show your own process. The ladder is not built for speed. It is built so that whatever you say while searching is true, relevant and gradeable. Two of the ninety seconds above were silence. The other eighty-eight were speech, which is the only reason none of it sounds like a stall.

Where an on-screen solver fits, and where it does not

Practice is the honest use case. Run the ladder yourself on a problem you cannot solve, out loud, on a timer, then check your rungs against a worked solution. OfferPilot AI includes a Code Copilot for that step: Ctrl+Alt+S starts a screenshot capture, you drag a box, you get about three seconds to scroll, then drag again for a problem spanning several screens. Enter sends every shot together and Esc cancels. OCR runs server side, so text-only models can read the problem. What comes back is an optimal solution with the intuition, a dry run and the Big-O. Gemini is the recommended model for coding and LeetCode-style problems. The overlay is excluded from screen capture at the operating system level, so it is absent from Zoom, Teams, Meet, OBS and screenshots while staying visible on your own monitor. The Code Copilot page covers the capture flow.

The part worth taking from any worked solution is rung 4, not the code. Read the intuition and the complexity, close it, then try to rebuild the bottleneck sentence from memory. If you can still say "the expensive part is rescanning the overlap" a week later, you own the pattern. If all you can reproduce is the deque code, you own nothing.

When neither the ladder nor a tool will save the round

Four limits, stated plainly.

  • The ladder converts a zero into a partial, not always into a pass. If you have never met the pattern, rung 3 may be your ceiling for that round. A stated brute force with correct complexity, clean code and a named bottleneck is a respectable partial, and on a demanding loop it can still be a no. Prepare so that the ladder is a recovery move rather than your primary strategy.
  • Capture exclusion is not invisibility. It hides the overlay from screen sharing and screen recording. It does nothing about a webcam, a lockdown browser, a proctor watching you in person, eye tracking, or a second-device camera. If the round says no assistance, that setting is the answer, and the five sentences above are the only tool you should bring.
  • A read-out solution has a tell. Correct code with no reasoning attached invites a follow-up question, and the follow-up is where it comes apart, because interviewers probe the parts you skipped. In a live human round, the ladder outperforms a pasted optimum.
  • Platform and format limits. Windows 10 and 11 only. No macOS, no Linux, no mobile, no browser extension. In a whiteboard or in-person round there is nothing to screenshot and nothing to display, so the ladder is all you have. Metering counts listening time only, so the clock advances just while the copilot is receiving interviewer audio.

Drill the first ninety seconds, not the problems

Under adrenaline you get motor memory, not judgement, so the sequence has to sit closer to a reflex than to a technique you recall. Take a problem you know you cannot solve, start a timer, and practise only the first ninety seconds: restate, hand-run, brute force with its Big-O, bottleneck, scoped question. Then stop. Do not solve it. You are training the recovery, not the solve. Somewhere around twenty repetitions the sentences start arriving on their own, which is exactly when you need them, because on the day the part of you that plans will be busy panicking. The free tier is five minutes a day with no card, which is enough to check your rungs against a worked answer after each rep.

Related guides

Stuck should cost you ninety seconds, not the round.

Practise the five rungs, then check your bottleneck against a worked solution.