Answer method

UMPIRE: solving a coding problem out loud

UMPIRE is a problem-solving order for coding interviews, popularised by CodePath: Understand the problem with examples and edge cases, Match it to patterns you know, Plan the approach before writing code, Implement it, Review it by tracing an example, and Evaluate time and space complexity. Interviewers judge the reasoning as much as the code, so saying each step out loud matters as much as reaching a working solution. Some versions call the last step Expand.
4 min read · worked example
Where the time goes
U
Understand
15%
M
Match
8%
P
Plan
17%
I
Implement
35%
R
Review
15%
E
Evaluate
10%
Rough share of the time in a strong answer.
At a glance
  • 01
    Clarify with an example and an edge case before writing any code.
  • 02
    Say the plan, and what it costs, before you implement it.
  • 03
    Trace your code on an example yourself, before the interviewer does.

Weak and strong, step by step

A common warm-up problem, solved two ways. The code can end up the same; what the interviewer hears is not.
From the resume
“Solved 300+ problems on LeetCode · Java, Python · Data structures and algorithms coursework.”
Interviewer
Return the first character in a string that does not repeat.

Understand

~15% of the time
"So for 'swiss' the answer is 'w'. What should I return if every character repeats, an empty string? And is it lowercase letters only, or any character?"
What changes: An example and two edge cases, out loud. Typing at once often means solving a slightly different problem.

Match

~8% of the time
"It's a counting problem: one pass to count each character, then a second pass in the original order to find the first with a count of one."
What changes: Names the pattern, which tells the interviewer where you are heading.

Plan

~17% of the time
"Two passes with a hash map: O(n) time, and constant extra space if the alphabet is fixed. A nested loop would be O(n²), so I'll avoid it."
What changes: The approach and its cost before any code. The interviewer can redirect you now, not in ten minutes.

Implement

~35% of the time
(Writes the two loops, naming each step: "first the counts… now the scan in order.")
What changes: Narrating keeps the interviewer with you, and lets them give a hint while it is cheap.

Review

~15% of the time
"Tracing 'swiss': counts are s 3, w 1, i 1. Scanning in order, s has 3, w has 1, so we return w. For 'aabb' the loop ends and we return an empty string."
What changes: Tests the code on the example and the edge case, before the interviewer has to.

Evaluate

~10% of the time
"O(n) time, O(k) space for k distinct characters. If the input were a stream, I'd keep counts plus first-seen order so each query stays fast."
What changes: The complexity, and one way it could change. That opens the follow-up conversation on your terms.

Thinking out loud

The interviewer can only credit reasoning they can hear.
  • 01
    Say what you are about to do before you do it.
  • 02
    When stuck, say what you tried and why it doesn't work.
  • 03
    Take a hint as information, not as a mark against you.
  • 04
    After a minute or so of silence, give a short status update.

Brute force first?

Saying the simple solution and its cost is useful: it shows you understand the problem and gives a baseline. Then improve it. Write the brute force only if time is short or the interviewer asks for it.

Resume projects come first

Coding rounds often open with a project from your resume. The follow-up ladder covers those questions; UMPIRE covers the problem that comes after.

Where DEFEND fits

See which of your own lines need this most.
DEFEND reads your own resume claim by claim and shows the technical claims on your resume and the concepts behind each one, so the questions around the coding problem are prepared too. Start with the free preview: no sign-in, about a minute.

Common questions

Understand, Match, Plan, Implement, Review, Evaluate. Some versions call the last step Expand: extending the solution or discussing follow-ups.