Why mock drills matter: the flight simulator analogy
Pilots don't learn to fly in real planes from day one — they train in flight simulators. The simulator recreates the stress, the instruments, the edge cases, all without real consequences. Mock drills are your flight simulator for coding interviews. You might know every pattern cold, but performing under a clock, with someone watching, while narrating your thoughts — that's a completely different skill that only deliberate practice builds.
🎮 The rule: Once you can consistently score ≥4/5 on 3 consecutive Format A drills, you're interview-ready on this axis. Most candidates who "know DSA" skip drills and discover this gap in real interviews. Don't be that candidate.
The gap drills close
Knowing the patterns and performing under observation are different skills. Real interviews add a clock, an audience, narration while typing, and recovery-from-stuck — none of which LeetCode-in-silence trains. Drills install those. The good news: the performance layer is more trainable than the algorithmic one, and it's where most prepared candidates actually fail.
Complexity & time budgets
| UMPIRE phase | Time budget (35-min problem) | What you're proving |
|---|---|---|
| U — Understand | ~5 min | You won't code the wrong problem |
| M — Match | ~3 min | Pattern recognition is trained |
| P — Plan | ~5 min | You can reason before coding |
| I — Implement | ~15 min | You code cleanly under pressure |
| R — Review | ~5 min | You catch your own bugs |
| E — Evaluate | ~2 min | You know your solution's cost |
The protocol: UMPIRE
Run every drill problem through the same six beats — the structure is what keeps you calm when the problem is hostile:
- U — Understand. Restate the problem in your own words. Ask about constraints: n's size, value ranges, duplicates, empty input. (n ≤ 10⁵ whispers O(n log n); n ≤ 20 whispers backtracking.)
- M — Match. Name candidate patterns out loud: "contiguous substring → sliding window; or precompute with a hash map…"
- P — Plan. Two-to-four sentences, before code: approach, data structures, complexity target. Get a nod.
- I — Implement. Narrate intent while typing ("dummy head so head deletion isn't special-cased"). Clean names (Level 1 rules) — reviewers grade them.
- R — Review. Walk one normal case and one edge case through the code line by line, before declaring done. Catching your own off-by-one beats the interviewer catching it, by a lot.
- E — Evaluate. State time and space complexity, and one trade-off or improvement ("with sorted input, two pointers drops the dict").
Time budget for a 35-minute problem: ~5 / 3 / 5 / 15 / 5 / 2. The most common self-sabotage is jumping U→I in ninety seconds; the second most common is polishing P forever and never finishing I.
Code: the patterns you'll use in drills
The most common patterns you'll implement in drills — with the exact code structure:
# Sliding window template — used in ~30% of medium problems
def sliding_window(s, k):
window = {}
left = result = 0
for right, ch in enumerate(s):
window[ch] = window.get(ch, 0) + 1 # expand right
while len(window) > k: # shrink until valid
window[s[left]] -= 1
if window[s[left]] == 0:
del window[s[left]]
left += 1
result = max(result, right - left + 1)
return result
# BFS template — for all grid/graph shortest-path drills
from collections import deque
def bfs(grid, start):
rows, cols = len(grid), len(grid[0])
queue = deque([(start[0], start[1], 0)]) # (row, col, distance)
visited = {start}
while queue:
r, c, dist = queue.popleft()
for dr, dc in [(0,1),(1,0),(0,-1),(-1,0)]: # 4-directional
nr, nc = r + dr, c + dc
if 0 <= nr < rows and 0 <= nc < cols and (nr,nc) not in visited:
visited.add((nr, nc))
queue.append((nr, nc, dist + 1))
// BFS template in Java
import java.util.*;
public int bfs(int[][] grid, int[] start) {
int rows = grid.length, cols = grid[0].length;
Queue<int[]> queue = new LinkedList<>();
Set<String> visited = new HashSet<>();
queue.offer(new int[]{start[0], start[1], 0});
visited.add(start[0] + "," + start[1]);
int[][] dirs = {{0,1},{1,0},{0,-1},{-1,0}};
while (!queue.isEmpty()) {
int[] curr = queue.poll();
int r = curr[0], c = curr[1], dist = curr[2];
for (int[] dir : dirs) {
int nr = r + dir[0], nc = c + dir[1];
String key = nr + "," + nc;
if (nr >= 0 && nr < rows && nc >= 0 && nc < cols
&& !visited.contains(key)) {
visited.add(key);
queue.offer(new int[]{nr, nc, dist + 1});
}
}
}
return -1; // unreachable
}
// BFS template in C++
#include <queue>
#include <vector>
#include <set>
using namespace std;
int bfs(vector<vector<int>>& grid, pair<int,int> start) {
int rows = grid.size(), cols = grid[0].size();
queue<tuple<int,int,int>> q;
set<pair<int,int>> visited;
q.push({start.first, start.second, 0});
visited.insert(start);
int dirs[4][2] = {{0,1},{1,0},{0,-1},{-1,0}};
while (!q.empty()) {
auto [r, c, dist] = q.front(); q.pop();
for (auto& d : dirs) {
int nr = r + d[0], nc = c + d[1];
if (nr >= 0 && nr < rows && nc >= 0 && nc < cols
&& !visited.count({nr, nc})) {
visited.insert({nr, nc});
q.push({nr, nc, dist + 1});
}
}
}
return -1;
}
Drill formats
Format A — the standard rep (45 min, 2–3×/week). One unseen medium from a Blind 75 group you've finished. Timer visible. Full UMPIRE, speaking aloud the whole time — yes, alone at your desk; narration is a motor skill and silent practice doesn't build it. Recording yourself once a week is uncomfortable and pays off immediately: you'll hear the dead air and the mumbled complexity claims.
Format B — the pressure set (60–75 min, weekly in the final month). Easy + medium + medium/hard back-to-back, simulating a real loop's pacing decisions: when to bank a fast solve, when to cut losses and present a partial.
Format C — the human mock (the gold standard, ≥4 before the real loop). A friend/peer plays interviewer with a problem you haven't seen. Their job: stay mostly silent, drop one hint if you're stuck >10 min, and fill the rubric below. Trade roles — interviewing someone else teaches you what the rubric looks like from the grader's chair, which permanently changes how you present. (Platforms like Pramp pair strangers for exactly this.)
Format D — recovery reps (15 min, as needed). Deliberately practice being stuck: open a hard problem, and the drill is the first 15 minutes only — generate brute force, name patterns that don't fit and say why, find any partial structure. You're training the moment panic usually wins.
The rubric (score every drill)
| Axis | 1 | 3 | 5 |
|---|---|---|---|
| Understanding | coded immediately, wrong problem | asked some constraints | restated + probed edges before planning |
| Approach | no stated plan | plan emerged mid-code | plan + complexity stated and confirmed upfront |
| Correctness | wrong / major bugs | minor bugs, fixed when prompted | worked; edge cases self-caught in Review |
| Code quality | unreadable names, tangled flow | readable | clean structure, named helpers, guard clauses |
| Communication | silent stretches > 1 min | narrated when prompted | continuous, structured narration |
| Complexity | wrong / absent | right after thought | stated unprompted, with trade-offs |
Log scores per drill (the same self-tracking habit as the problem-bank flashcards). Two patterns predict real outcomes: a flat ≥4 average across axes beats a spiky 5/5/2 profile, and Communication improves fastest — usually within five spoken drills.
When you're stuck mid-drill (the script)
Memorize the ladder, climb it out loud:
- Re-read the constraints — the hint is usually there (sorted? small n? values bounded?).
- Solve a tiny case by hand and watch yourself do it — your manual method often is the algorithm.
- Say the brute force and its complexity; ask "which part is redundant work?" — the answer names the structure (re-scanning → hash; re-summing → prefix; re-sorting → heap).
- Name the gap explicitly: "I need 'have I seen this?' in O(1)" — even unfinished, this earns pattern-recognition credit.
- Take the hint gracefully and use it. Hint-resistance is a real rejection reason; hint-usage is a real hire signal ("coachable").
Common mistakes
- Drilling only new problems. Re-deriving old ones cold is the retention mechanism; new-only feels productive and decays in days.
- Silent practice. The narration is graded; train it or it won't exist under pressure.
- No timer / soft timer. The clock is most of the difficulty. Hard stop, then post-mortem.
- Skipping Review. "Done!" with an untested edge case converts a 5-minute self-catch into the interviewer's note: missed empty input.
- Mock-only-hards. Real loops are mostly mediums done well; drill the level you'll face, with excellence, not the level that flatters anxiety.
- No post-mortem. Five written minutes after each drill — what stalled, which rubric axis dipped, one fix for next time — doubles the value of the hour.
Think it through
PROBLEMGiven an m×n grid of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and formed by connecting adjacent lands horizontally or vertically.
- 1
U — Understand
“Restate the problem. What are the constraints? What are the edge cases?”
- 2
M — Match
“What pattern does 'connected regions in a grid' match?”
unlocks after the stage above - 3
P — Plan
“State your approach in 3 sentences before writing code.”
unlocks after the stage above - 4
I — Implement
“Write the BFS version. What's the key implementation detail?”
unlocks after the stage above - 5
R — Review + E — Evaluate
“Trace through a small example. Then state time/space.”
unlocks after the stage above
Interview perspective
Practice — climb the ladder
Climb in order — every rung assumes the one above it. Solve on LeetCode, then tick it here; progress is saved on this device.
Format A warm-up
well-structured mediums — practice the full UMPIRE protocol- Number of IslandsMedium
Classic BFS/DFS flood fill — perfect UMPIRE practice.
Sliding window — state window invariant while coding.
BFS on tree — narrate the level-size trick.
Format B pressure set
mix of difficulties — practice pacing decisions- Two SumEasy
Bank it fast (< 10 min) — don't over-engineer the easy one.
- Coin ChangeMedium
DP — state the greedy trap before coding.
- Word SearchMedium
Grid backtracking — mark/unmark visited carefully.
Format D — recovery reps
hard problems — practice the stuck-script, not the solutionPractice the brute force → prefix/suffix → two-pointer progression out loud.
Pre-order with null markers — reason about the encoding contract.
Practice
- Today: one Format A drill, spoken, timed, scored. Note which UMPIRE beat you skipped — that's next drill's focus.
- This week: recruit a mock partner and run Format C both directions; compare your self-scores against their rubric scores.
- Recovery rep: open a hard you've never seen; practice only the stuck-ladder for 15 minutes. The goal is composure, not a solve.
- Graduate: when three consecutive Format A drills average ≥4 across the rubric, you're interview-ready on this axis — shift remaining time to system design and behavioral.
That completes Level 4. From here the roadmap climbs the design ladder: LLD and HLD.
Check yourself — drill discipline
1. Which UMPIRE phase do most candidates skip, directly causing interview failures?
2. You're drilling alone. Should you narrate your thinking out loud?
3. Your approach collapses at minute 20 of a 35-minute problem. Best move?