How to Think Out Loud in a Coding Interview
In a live coding interview, the interviewer is grading two things: whether you get to a working solution, and how you think on the way. Many strong programmers fail the second part. They go quiet for ten minutes, type, and hope. The interviewer has no idea whether they are stuck, close, or off track, so they can't help and can't give credit for good reasoning.
Thinking out loud fixes that. It is a skill you can learn, and it follows a simple sequence.
Quick answer: In a coding interview, think out loud using six steps: restate the problem and ask clarifying questions, walk through an example, describe a brute force solution and its complexity, improve it, write the code while narrating, and test it with examples including edge cases.
Step 1: restate and clarify (2 to 3 minutes)
Say the problem back in your own words and ask questions:
- "So I get an array of integers and need to return the two indices that add up to the target?"
- "Can the array contain negative numbers? Duplicates?"
- "Is there always exactly one answer?"
- "How large can the input be?"
Input size tells you what complexity is acceptable. If n can be a million, an O(n²) solution probably won't be enough.
Step 2: work through an example
Take a small input and solve it by hand, out loud:
If the array is 2, 7, 11, 15 and the target is 9, then 2 plus 7 is 9, so the answer is indices 0 and 1.
This catches misunderstandings early and often shows you the pattern.
Step 3: say the brute force first
Even if you already see a clever solution, mention the simple one:
The simplest approach is to check every pair. That's two loops, so O(n²) time and constant space. It works, but for large inputs we can probably do better.
This shows you can always get to something that works, and gives you a fallback if the optimal idea doesn't pan out.
Step 4: improve it
Talk through the bottleneck:
The slow part is that for each number, I'm searching the rest of the array for its complement. If I store numbers I've seen in a hash map, I can check for the complement in constant time. That makes it O(n) time and O(n) space.
Ask before diving in:
Does that approach sound good, or would you like me to consider something else?
Interviewers often drop a hint at this point. Take it.
Step 5: code while narrating
You don't need to explain every character. Narrate the structure:
I'll create an empty map. Then loop through the array with the index. For each number, I compute the complement. If it's in the map, I return both indices. Otherwise I store the current number.
If you go quiet for a stretch to focus, say so: "Let me write this part and then I'll walk you through it."
Step 6: test it
Don't say "I think it works." Run through your earlier example line by line. Then check edge cases:
- Empty input or a single element.
- Duplicates, such as 3 and 3 with target 6.
- Negative numbers.
- Very large values.
Finding and fixing your own bug is a positive signal.
When you get stuck
Being stuck isn't failing. Going silent while stuck is the problem. Say what you're thinking:
I'm trying to figure out how to avoid recomputing these subarrays. One idea is a prefix sum. Let me check if that works here.
If you're completely stuck, it's fine to ask: "Could you give me a small hint on the direction?" Most interviewers would rather give a hint than watch you struggle in silence.
Practice that actually builds the habit
Solving problems silently on a practice site doesn't train this skill. Instead:
- Solve problems while speaking out loud, even alone.
- Record yourself once a week and listen back.
- Do mock interviews with a friend where one person must talk throughout.
Common patterns to recognise
Most coding interview problems use a small set of techniques: hashing, two pointers, sliding window, binary search, BFS and DFS, and dynamic programming. Once you can spot which one a problem needs, thinking out loud gets much easier, because you can name the pattern and explain why it fits.
During a live round
If you tend to freeze under a timer, SilentlyAI can help. When you ask, it shows a suggested approach and explanation on your screen, which you can use to get your own reasoning going again.
Frequently asked questions
Why do interviewers want you to think out loud?
It lets them see your problem-solving process, give hints at the right time, and give you credit for good reasoning even if the final code isn't perfect.
Should I start with the brute force solution?
Yes, briefly. Mention it and its complexity, then improve it. It shows you can always reach a working answer.
What if I go silent while coding?
Say you're focusing on a part and will explain it after. Then walk through what you wrote.
What should I do when I'm stuck in a coding interview?
Say what you're trying, explain where it breaks down, and if needed ask for a hint. Silence is worse than being stuck.



