Candidate stories

What to do when you're stuck in a coding interview

You understand the problem, but you can't see the solution. A quiet pause is fine; explaining your next step gives the interviewer something to follow.

For candidates preparing for technical interviews
01

A candidate faced an unfamiliar problem

In a Reddit discussion, a self-described interviewer recalled a bootcamp graduate who hadn't used a binary search tree. The candidate attempted the problem, followed a drawing and worked through prompts. The interviewer said they hired the candidate, partly because of their response to guidance.

This is one unverified, second-hand account. The exact problem and full hiring criteria aren't known. Other employers may require a complete solution.

02

Make the problem smaller

Restate the task and check the input, output and any important constraints. Work through a small example by hand, then describe a straightforward approach before trying to optimize it.

If you know your first approach may be slow, explain why. A correct starting point gives you something concrete to test and improve.

03

Use a hint and keep going

If the interviewer suggests a tool or data structure you don't know, say what you understand and check it. Then apply the hint to your example instead of pretending you knew it already. For example, you could say:

I haven't used that structure before. From your example, I think it helps us look up a value we've already seen. Is that right?

If a test exposes a mistake, explain what failed and revise your approach.

04

Be clear about what remains

If time runs out, say what you've solved and what you would check next. A partial answer may be enough in some interviews and insufficient in others. Practice explaining your reasoning alongside solving problems, so both are easier to share under pressure.

Source and methodology

This story is based on a public, unverified second-hand account. Interviewer account on Reddit.

Keep preparing

Explore related guides or use a real job description to build your own practice plan.

For more interview preparation advice, see Boston College's interviewing resources and VCU Career Services' common interview questions.