Lesson 44.2 · Interview Method and Simulation
Explaining Your Thinking
Narrate decisions, not keystrokes: what you're trying, why, what it costs, and what you'll check. When stuck, say what you've ruled out.
10 min
Think of it like this
A sports commentator doesn't describe every step a player takes; they explain the choice: why the pass went left, what the risk was.
1.A sample talk track (Longest Substring Without Repeating Characters)
"So I need the longest contiguous piece with all distinct characters. Contiguous plus longest suggests a sliding window." → "Brute force checks every substring with a set: O(n²) substrings, O(n³) total, too slow for 5 × 10⁴." → "With a window, I extend the right end, and if the new character is already inside, I move the left end past its last position. A map from character to last index lets me jump. That's O(n) time, O(alphabet) space." → "Edge cases: empty string, all the same letter, and a repeated character that's before the window (I must not move left backwards)."
When stuck: "I've tried sorting, but that loses the order the problem needs. Let me look at what the brute force repeats…" Interviewers can only help with what they can hear.
Remember
- Explain why, not what.
- Mention complexity at each idea.
- Say what you've ruled out.
Common mistakes
- Reading code aloud character by character.
- Going silent for minutes.