Skip to main content
PProfileMatch

How to Think Out Loud in Problem-Solving Interviews

Soft SkillsLesson 4 of 45 min read

What you'll learn

  • Clarify an interview problem with focused questions and examples
  • Start with a brute-force solution and improve it while narrating trade-offs
  • Recover calmly when you are stuck without going silent
  • Use ready-made phrases for each stage of the interview

On this page

  1. What thinking out loud is, and why interviewers want it
  2. The structure: five stages and what to say
  3. Narrating trade-offs
  4. What to do when you are stuck
  5. Common mistakes
  6. How this shows up in interviews and on the job
  7. How to practice

In a problem-solving interview, silence is the enemy. Interviewers cannot give you credit for thinking they cannot hear, and they cannot help you if they cannot see where you are stuck. Thinking out loud is a learnable skill, and it is mostly about knowing what to say at each stage.

What thinking out loud is, and why interviewers want it

Thinking out loud means narrating your reasoning as it happens: what you understand, what you are considering, why you are choosing one approach over another, and what you will check. It is not reading code aloud or filling the air with nervous chatter. It is making your thought process available.

Interviewers want it for practical reasons. At work you will explain your reasoning to teammates constantly, the interview is a small sample of that, and a clear reasoning trail lets them give hints or credit partial progress. The final answer matters, but a candidate who reasons well and gets 80 percent of the way often looks better than one who silently produces code.

The structure: five stages and what to say

StageGoalSample phrases
1. ClarifyMake sure you solve the right problemCan I confirm the input and output? What size can the input be? Are duplicates or empty inputs possible?
2. ExamplesTest your understandingLet me try a small example. And an edge case: empty input.
3. Brute forceGet a correct baselineThe simplest approach is... it costs O(n squared) time. Let me see if we can do better.
4. OptimiseImprove using the bottleneckThe slow part is the repeated search. If I store values in a hash map I can look them up directly.
5. Code and testImplement, then verifyI'll write this in pieces. Let me trace it on the example, then on the edge case.

Worked example: longest substring without repeating characters

Here is a student's narration for the problem 'Given a string, find the length of the longest substring without repeating characters.' The interviewer's replies are included so you can see how the dialogue works.

Narrated solution
Clarify:
"Substring means contiguous, not a subsequence, right? Is the string ASCII or can it be Unicode? Can it be empty?"
Interviewer: "Contiguous. Assume lowercase English letters. Empty is possible."

Examples:
"For abcabcbb the answer is 3, from abc. For bbbbb it's 1. For empty it's 0."

Brute force:
"The simplest way is to check every substring and test whether it has repeats. There are O(n squared) substrings and checking each takes O(n), so O(n cubed) total. I can reduce the check using a set, but it's still O(n squared) at best. Let me look for something better."

Optimise:
"The wasted work is that when I extend a substring I re-check characters I already know are unique. What if I keep a window with a left and right pointer and move the right pointer forward? When I hit a repeat, I move the left pointer past the previous occurrence. Each pointer only moves forward, so it's O(n) time."

Trade-off:
"I need a map from character to its last index. With lowercase letters that's at most 26 entries, so effectively O(1) space."

Code and test:
"I'll write the loop, then trace abcabcbb to check the window moves correctly."

Narrating trade-offs

Whenever you choose between approaches, say the cost and benefit in one breath: 'This uses extra memory, O(n), but turns each lookup into O(1). I think that's worth it unless memory is tight. Is it?' Asking for a constraint is good, as long as you also state your default so you are not waiting for them to rescue you. The same habit carries into design discussions; see the System Design Interview Prep Guide.

What to do when you are stuck

Everyone gets stuck. Interviewers watch how you handle it. Stay audible, return to what you know, and try a concrete move.

  • Say where you are: 'I'm stuck on how to avoid re-checking characters. Let me think about what information I'm throwing away.'
  • Go back to an example and solve it by hand. Notice what you do naturally and turn it into steps.
  • Simplify: solve a smaller version, such as without the duplicates requirement, then add the difficulty back.
  • Ask about a data structure or constraint: 'Would it be reasonable to assume the input is sorted?'
  • Fall back to the brute force and say so: 'I'll code the simple version first so we have a working solution, then improve it if there's time.'
  • Take a hint gracefully and build on it. Taking a hint is normal and not an automatic failure.
Phrases for stuck moments
"Let me restate where I am so I can find the gap."
"I'm not seeing the optimal approach yet. Let me get a correct solution first."
"Can I take a minute to think in silence? I'll tell you when I have a direction."
"That hint helps. So I could use ... which would change the cost to ..."
"I made a mistake here. Let me trace again... yes, the left pointer should move to the previous index plus one."

Common mistakes

  • Starting to code in the first minute without clarifying.
  • Going completely silent for several minutes. If you need quiet time, announce it and keep it short.
  • Reading code aloud line by line instead of explaining intent and decisions.
  • Jumping straight to the clever solution you half-remember and getting lost in it.
  • Not testing: finish with a trace through an example and an edge case.
  • Arguing with hints or getting defensive when you spot a bug. Treat it as a collaborative debugging session.
  • Skipping complexity analysis. State time and space cost without being asked.

How this shows up in interviews and on the job

For coding and technical interviews, this is the core skill; see Coding Interview Prep for Self-Taught Developers for what to practice and How to Crack FAANG Interviews for how large companies typically structure their rounds. For non-coding problem-solving or case questions, the same stages apply: clarify, give an example, start with a simple structure, refine and sanity-check. Behavioral rounds reward a similar narrated clarity, so pair this with the STAR method. On the job, thinking out loud is how you collaborate during debugging sessions, code reviews and design discussions, so it is not just an interview trick.

How to practice

Pick one easy or medium problem a day. Set a timer for 30 minutes. Talk out loud through all five stages, recording yourself on your phone if you can. Play it back and note long silences, missing clarifying questions and skipped tests. Then try with a friend playing the interviewer, who is told to give only small hints. The framework behind these stages is in A Practical Problem-Solving Framework.

Try it yourself

Choose one easy coding problem (for example, checking whether a string is a palindrome ignoring punctuation). Set a 20-minute timer, record yourself on your phone, and talk through clarify, example, brute force, optimise, code and test. Play it back and write down three phrases you would change.

Show a hint

Count the silences longer than ten seconds in your recording. For each one, write the sentence you could have said instead, such as 'I'm considering two approaches...'.

Key takeaways

  • Interviewers can only reward reasoning they can hear, so narrate decisions and not just code.
  • Follow the stages: clarify, example, brute force, optimise, code and test.
  • State a correct brute-force solution first, then point to the wasted work to improve it.
  • Say the cost and benefit of each trade-off in one sentence.
  • When stuck, stay audible, return to an example, simplify, and take hints gracefully.

Test yourself

A trick from this lesson's ride: Questions first, keyboard last. Four more tricks like it wait along the route, each followed by a question.

Ride this lesson

Frequently asked questions

How do I think out loud in a coding interview?

Narrate your steps: clarify the problem, work through an example, state a brute-force approach with its cost, then explain how you would improve it and why. Say your trade-offs and test with an example at the end. Explain intent instead of reading code line by line.

What should I do if I get stuck during a technical interview?

Say where you are stuck, go back to a small example and solve it by hand, or simplify the problem. If needed, code the brute-force solution first and improve it afterwards. Asking a focused question and taking a hint are normal and show you can collaborate.

Should I start with brute force in an interview?

Usually yes, as long as you say it is a starting point. A correct simple solution proves you understand the problem, gives you a baseline to improve and often reveals the bottleneck. State its time and space cost, then explain how you will optimise it.