Internship interviews
How to think out loud in a coding interview
Coding interviews test more than how fast you reach working syntax. Hiring teams watch how you clarify ambiguity, narrate tradeoffs, respond to feedback, and verify edge cases while working alongside an interviewer. This guide covers each stage in turn, with a labeled walk-through of one problem and a ten-minute daily drill.
Your first hour with George Li (60 minutes by video, $250) ends with a written plan within one working day.
Book your first hour ($250)Why interviewers evaluate how you communicate
Solving algorithmic problems quickly on your own is only half of a technical screen. Once you join an engineering team, you rarely code in isolation; you scope ambiguous tickets, debate implementation options with teammates, and recover when an assumption breaks.
Because of that reality, interviewers pay close attention to how you approach an unfamiliar problem, explain your reasoning out loud, and handle unexpected obstacles in the room. For many engineers running the session, collaboration and clear communication carry as much weight as raw coding speed.
Treat the interviewer as an engineering teammate rather than a silent proctor grading you from across the table.
Start by clarifying requirements and outlining a plan
Ask clarifying questions before typing
Diving straight into code the moment you read the prompt is one of the fastest ways to raise concern. Writing lines immediately signals two habits teams want to avoid: rushing forward without thinking through constraints, and working without checking in with collaborators.
Even if a solution jumps to mind right away, pause to open a brief dialogue. Ask about input limits, expected performance targets, edge cases, or assumptions you want to confirm before committing to a design.
Use pseudocode to align on logic
Before translating everything into strict syntax, sketching brief pseudocode is a practical way to make your thinking visible. Ask the interviewer if they are comfortable with a quick outline first. You still need to finish with real, runnable-quality code by the end of the session, yet validating the structure early prevents costly rewrites halfway through.
Break the work into small milestones
Most interview problems split naturally into two to five focused tasks that each take a few minutes to implement. While outlining your design, name those sub-tasks explicitly and share the order in which you will tackle them.
As you finish each piece, mark it complete and announce the next step, such as moving from parsing input to building the traversal helper. Checking off smaller goals keeps your confidence steady and shows the interviewer how you break large projects into manageable deliverables.
Narrate your thought process and handle roadblocks
Walk through steps like a collaborator
Interviewers want visibility into how you reason, not just the final output on the editor. Explain why you are choosing a specific loop, data structure, or state variable, and voice any assumptions as you go. Keep your tone professional at all times and avoid casual profanity even when frustrated by a bug.
Thinking out loud does not require nonstop chatter. When you hit a dense calculation or pointer index that takes deep focus, tell the interviewer you need a quiet minute or two to work through the detail, then pause and summarize what you decided before continuing.
Notice subtle nudges and ask for hints sparingly
Almost every interviewer wants to see you succeed and will drop gentle pointers if you start drifting down an unproductive path. When you narrate your thinking clearly, your interviewer has the context needed to steer you back before you burn fifteen minutes. Stay attentive to their remarks so interview stress does not make you talk right past helpful cues.
If you do hit a wall, voice the exact point where your reasoning stalls so they can offer guidance naturally. Only when nothing clicks should you ask directly for a hint. Asking once is far better than sitting frozen without writing code, though relying on repeated hints can make an interviewer doubt your independent problem-solving.
Be honest instead of bluffing
Whenever you forget a standard library method, syntax rule, or complexity detail, admit it plainly instead of guessing and digging a deeper hole. Interviewers spot bluffing quickly and deduct trust.
You can state directly that you are unsure, share your best hypothesis for confirmation, or explain the data structure you want to use and ask whether you may look up its exact method signature. Many interviewers allow brief documentation checks because they mirror real day-to-day engineering.
A labeled walk-through of one of our problems
The problem comes from our checked bank. Its answer is recomputed by a separate program when the site is built.
Problem 1. What is the largest sum of a non-empty contiguous block of [4, -9, 3, -2, 5, -1, 6, -12, 7, 2, -3, 8]? Give an integer.
Show the answer and the working
Answer: 14
- Scan once keeping the best sum of a block that ends at the current position: it is max(current value, previous best + current value).
- Those running values are 4, -5, 3, 1, 6, 5, 11, -1, 7, 9, 6, 14.
- The largest running value is 14, from the block 7, 2, -3, 8. This takes O(n) time instead of checking all O(n^2) blocks.
Here is a candidate’s narration, labeled by the stage it belongs to: clarify, plan, code and test. It is an illustration of the habit, not text to repeat.
- [Clarify] So I am looking for the largest sum of a block of neighbors that must have at least one number. Can the numbers be negative? Yes, the list has some. Then I should not assume the answer is a sum of all the positives.
- [Plan] The direct way is to try every start and end and add up each block. That is about n squared blocks, and adding each can make it n cubed unless I keep running sums. I think there is a single pass. At each position I can ask: is the best block ending here better as just this number, or as the best block ending at the previous position plus this number? I keep that value as I go, and the answer is the largest value I see. That takes one pass, so O(n) time.
- [Code] I will keep a variable for the best block ending here, and one for the best overall. For the first number both are that number. For each next number, the block ending here is the larger of the number alone and the previous value plus the number. Then I update the overall best.
- [Test] I will trace the list by hand and check the running values against the code.
| Position | Value | Best block ending here |
|---|---|---|
| 1 | 4 | 4 |
| 2 | -9 | -5 |
| 3 | 3 | 3 |
| 4 | -2 | 1 |
| 5 | 5 | 6 |
| 6 | -1 | 5 |
| 7 | 6 | 11 |
| 8 | -12 | -1 |
| 9 | 7 | 7 |
| 10 | 2 | 9 |
| 11 | -3 | 6 |
| 12 | 8 | 14 |
The largest value in the last column is 14, which matches the bank’s answer. The candidate finishes the test stage by saying the edge cases: a list of one number returns that number, and a list of all negative numbers returns the largest single number, since the block must not be empty. Then the candidate states the running time and the memory used: one pass, and a few variables.
Note what the narration does for the interviewer. The clarify stage settled an assumption about negative numbers, the plan named two methods and a running time for each and the test stage found the answer without being asked.
Pace the session and maintain forward momentum
Running out of time usually happens when a candidate lingers too long in one stage. Build awareness of the clock during practice using the same watch or desk timer you can keep beside your screen in a remote round.
| Session window | Primary focus | What to communicate |
|---|---|---|
| Opening minutes | Clarify prompt and edge cases | Confirm constraints, input types, and expected outputs |
| First 10 minutes | Design approach and milestones | Compare options, agree on pseudocode, list sub-tasks |
| Around minute 20 | Active implementation | Narrate core code while keeping helper details modular |
| Around minute 40 | Testing and optimization | Trace test inputs, check edge cases, refine bottlenecks |
If your mind goes blank, give yourself permission to take a deliberate 30-to-60-second pause to reset. One quiet minute to organize your thoughts costs almost nothing compared with ten minutes of wandering down a broken path.
Start simple and keep code flowing
Chasing the cleanest optimal algorithm from line one often causes candidates to stall. Instead, tell your interviewer you are starting with a straightforward baseline solution, get the core logic down, and then refine it step by step.
For instance, on a two-dimensional grid problem, solve the logic for a single 1-by-1 cell first, verify how it behaves on a 2-by-2 square, generalize to an n-by-n grid, and finally extend to arbitrary m-by-n dimensions. This incremental habit keeps you moving forward and ensures you cover most of the problem even if time gets tight.
Similarly, if a minor helper function trips you up mid-implementation, state clearly what that helper is supposed to return, leave a placeholder call, and finish the main algorithm first. Returning to the helper later with fresh eyes often reveals a simpler design.
Discuss tradeoffs, test thoroughly, and ask thoughtful questions
Voice design tradeoffs early
Every data structure or algorithm carries a tradeoff between time complexity, memory overhead, and code clarity. Call out those tradeoffs proactively as you choose between options and explain why your pick fits the constraints best. Interviewers almost always ask about alternatives anyway, so raising them first demonstrates engineering judgment.
Debug and test before being prompted
Strong candidates do not stop typing and wait for the interviewer to point out mistakes. Use quick trace prints or step-by-step checks while building, then run structured tests once your solution is complete. Walk through representative inputs and expected outputs line by line as if you were executing the code yourself.
Check boundary and edge cases carefully. If your function accepts numeric values, verify behavior on zero, negative inputs, and fractional values alongside standard positive numbers. When testing uncovers a bug, stay calm: explain why the defect happened, describe the fix, and ask if there is enough remaining time to patch it.
Save genuine questions for the closing minutes
Most technical rounds leave a few minutes at the end for your questions. Skipping that window can make you seem indifferent about the team or role. Prepare thoughtful questions you cannot answer from a quick web search, such as what surprised the interviewer after joining, what your first six to twelve months on the team would focus on, what makes the engineering work enjoyable, or which technical bottlenecks the group faces right now.
How to practice speaking through problems
Solo coding builds syntax fluency, yet thinking out loud feels unnatural until you rehearse it with another person listening. Start by running mock sessions with classmates or peers, which costs nothing and builds comfort under a timer.
- Feedback accuracy can vary: Friends or fellow applicants may miss subtle communication habits or grading standards that real interviewers look for.
- Limited company context: Peers rarely know the specific follow-up depth or scoring style expected by your target engineering organization.
- Reliability on open matching platforms: Free peer-exchange sites sometimes suffer from last-minute cancellations that waste study blocks.
Whether you practice with trusted peers or seek structured mock feedback from an experienced engineer, simulating real timed conditions makes clarifying, pacing, and narrating feel automatic on interview day.
A ten-minute daily drill
The habit is built by repetition in small amounts, and it does not need a new problem each day.
| Minutes | What to do |
|---|---|
| 2 | Read a solved problem from the bank and its working once |
| 3 | Say the clarify and plan steps aloud, with the book closed |
| 3 | Say the test step aloud: one small case, one edge case, the running time |
| 2 | Replay your own recording or write down the one sentence you stumbled on |
| Total | 10 |
Use a different problem each day from the practice set below, or repeat the same ones for a week, since the aim is the speaking and not finding the answer. Record yourself on a phone, if you can, and listen back once a week. Here are three problems from our bank for the drill, each with an answer recomputed by a program.
Problem 2. Given the array [3, 4, 10, 11, 14, 7, 0, 21, 5, 2, 9, 12], how many pairs of positions i < j have a[i] + a[j] divisible by 7? Give an integer.
Show the answer and the working
Answer: 14
- Reduce each value mod 7: 3, 4, 3, 4, 0, 0, 0, 0, 5, 2, 2, 5.
- Residue counts: 0 appears 4 times, 3 twice, 4 twice, 5 twice, 2 twice.
- Pairs whose residues add to 0 mod 7: C(4,2) = 6 from residue 0, 2 x 2 = 4 from 3 with 4, 2 x 2 = 4 from 5 with 2.
- The total is 14, found in O(n) with a count table instead of checking all n^2 pairs.
Problem 3. How many times does the statement count++ run in the following code with n = 100? Give an integer. for (i = 1; i <= n; i *= 2) { for (j = 0; j < i; j++) { count++; } }
Show the answer and the working
Answer: 127
- The outer loop runs with i = 1, 2, 4, 8, 16, 32, 64 (128 is above 100).
- The inner loop runs i times for each i, so the total is 1 + 2 + 4 + 8 + 16 + 32 + 64.
- That is 2^7 - 1 = 127. In general the work is below 2n, so the loop pair is O(n), not O(n log n).
Problem 4. A sorted array has 1000 distinct values. A binary search sets lo = 0 and hi = 999, repeats mid = floor((lo + hi) / 2) and compares a[mid] with the target (one probe per pass), and then moves lo to mid + 1 or hi to mid - 1 until it finds the target. For a target that is in the array, what is the largest number of probes any such target can need? Give an integer.
Show the answer and the working
Answer: 10
- Each probe at least halves the range, and a range of size r needs at most floor(log2(r)) + 1 probes.
- For r = 1000, floor(log2(1000)) = 9, since 2^9 = 512 and 2^10 = 1024.
- So the worst case is 10 probes.
For more problems and the method behind them, see the coding and complexity practice page, and for a schedule, the coding prep schedule. The same habits help in a timed written test, where you can write your plan in a comment before you code.
When the question is analytical, not a coding problem
Some rounds, in data, quantitative and research roles in particular, are built to see how you reason rather than whether you land on one number. An analytical interview asks you to break a problem down, ask what you need and propose a way forward. A Handshake student-blog article that quotes Allstate says employers look for three things in these rounds: a habit of analysis, clear communication and room to grow. Its five tips match the narration habit, and each has a practice you can run today.
| Tip | What it asks of you | A practice |
|---|---|---|
| Think out loud | Say what stands out, what you assume and how you plan to proceed, even before you have a polished answer | Answer a question on a recording with no preparation and listen for silent stretches |
| Consider all the information given | A question may have several parts or several figures, and each deserves a mention | Underline every number and condition in a prompt, then say what each one changes |
| Ask questions | The facts you need can be missing at first, and asking for them is expected | Before every answer, ask two questions about scope or definitions |
| Support your answer | Where many answers are possible, the support often counts for more than the choice | After every answer, give one reason and one way it could be wrong |
| Do not let the question throw you | An unfamiliar topic can be deliberate, to see how you handle something new | Practice on a topic you have never studied, starting from what you do know |
An illustration with the numbers read aloud
Suppose a prompt says a lab has 120 jobs that each take 3 hours, on 8 identical machines, and asks how long the whole set will take. Say each fact and what it implies. The jobs hold 360 machine-hours of work. Split evenly over 8 machines, that is 45 hours each, if no machine ever waits. State your assumption aloud: if each machine also needs 1 hour of setup, the same split comes to 46 hours. Then say what would change it, such as jobs of unequal length, a machine that fails or a queue that cannot be split. The numbers are invented. The habit being practiced is to use every fact, state each assumption and show how the answer would move.
Start with the thinking-out-loud habits above and add this second layer: after you give an answer, say what evidence supports it and what would change your mind. An interviewer who sees the support has something to credit even when the answer differs from the one they had in mind.
To rehearse out loud with a partner, use the mock interview run sheet.
Questions
Why do coding interviewers ask me to think out loud?
Narration lets them see your reasoning, step in when you drift and give credit for a sound method. Google’s tips page says interviewers look at the thought process and not only the answer.
What should I say at the start of a coding problem?
Restate the task, ask about edge cases such as empty or negative input and state your assumptions. Then name a method and its running time before you code.
What should I do if I get stuck in a coding interview?
Say you are stuck and what you have tried, restate the task and work a smaller input by hand. A slow method that works is a good starting point.
How a session helps
In an hour ($250) George can give you a problem, ask you to narrate each stage, interrupt with the questions an interviewer would and mark where the explanation went quiet. You write every word and every line of code yourself. Your first purchase is refundable for unused time within 7 days.
Want help with your own applications? See internship interview coaching, a career coach for college internships, or resume review for internships.