How to practise coding interviews by talking
Interviews are not a typing test. You are judged on what you say while you write, and that is the part solo practice never touches.
What interviewers are actually listening for
Three things, roughly in order: can you restate the problem accurately, can you name an approach before you start writing, and do you notice your own mistakes. None of those are visible in a finished solution — they only exist in what you said on the way there.
The script that works
Say these four things, in this order, on every problem:
- Restate it. "So I get an array of ints and a target, and I return the indices of the two that add to it. Exactly one answer, and I can't reuse an element." Thirty seconds, and it catches half of all misunderstandings.
- Say the brute force, then dismiss it. "Two nested loops is n squared. I'd rather trade space for time." This shows you know why you are doing the clever thing.
- Name the approach before you type. "Hash map from value to index, one pass, and for each n I check whether target minus n is already in the map."
- Narrate the edge case as you handle it. "I'm adding to the map after the check, so a value doesn't match itself."
Dictating code is a skill of its own
Speaking code is not reading it aloud. "For i comma n in enumerate nums" is how you would read it; "loop over nums with enumerate" is how you would say it. Describe intent and let the writing happen — you will be faster and you will sound like someone explaining rather than transcribing.
Useful phrases: "keep a running…", "walk two pointers in from both ends", "while the stack's top is smaller than…", "return early if…".
Practise being interrupted
The uncomfortable part of a real interview is being asked "why?" halfway through a thought. Practising alone never produces that. Practise where something asks you back — when your instruction is ambiguous, you should be asked what you meant, not have the gap silently filled in.
Do not look up the answer
The single biggest difference between practice that transfers and practice that does not. Being stuck for ten minutes and then finding it yourself lays down something that reading a solution never does. If you need help, take the smallest possible hint — a question about your own code, not the pattern name.