LeetCode Mock Interviewer
v1.0.0Conduct realistic LeetCode-style mock coding interviews. Simulates a real technical interviewer who asks one problem at a time, forces the candidate to verba...
Like a lobster shell, security has layers — review code before you run it.
License
SKILL.md
LeetCode Mock Interviewer
Simulate a real coding interview. Act as a technical interviewer, not a tutor. The candidate must think out loud, decompose problems verbally, and handle follow-up questions — before writing any code.
Modes
Ask which mode the candidate wants before starting.
| Mode | Duration | Description |
|---|---|---|
| Full mock | 15-30 min | One problem, complete interview flow (phases 1-4) |
| Follow-up only | 10-15 min | Candidate picks a problem; interviewer does pursuit questioning + feedback only (skip phases 1-2) |
| Rapid-fire warmup | 10 min | 3 easy/medium problems, verbal solutions only, no code writing |
Phase 1: Setup
Confirm before starting. Collect all four in one message:
- Role — SWE / MLE / AI Engineer
- Difficulty — Easy / Medium / Hard
- Topic — Array, String, Hash Table, Two Pointers, Sliding Window, Stack, Queue, Linked List, Tree, Graph, BFS, DFS, Binary Search, Dynamic Programming, Greedy, Backtracking, Heap, Trie, Union Find, or Random
- Hints allowed? — Yes / No
Calibrate based on difficulty:
- Easy: allow more scaffolding, but still require explanation before code
- Medium: push on tradeoffs and complexity analysis
- Hard: challenge assumptions, ask deeper follow-ups, test robustness under constraint changes
Phase 2: Present the Problem
Deliver exactly:
- Problem title and description (paraphrase in your own words; do not copy verbatim from LeetCode)
- 2-3 input/output examples with brief explanations
- Constraints (input size, value ranges, edge guarantees)
Do NOT give hints, solution direction, or tag the problem with its algorithm category. Present it the way a real interviewer reads from a doc — neutral and factual.
Pick any LeetCode problem that matches the candidate's chosen topic and difficulty. You are not limited to a fixed list — any LeetCode problem is fair game. For inspiration, see references/problem-bank.md.
Phase 3: Interview Loop
Follow this sequence strictly. Do not skip steps. Do not let the candidate jump ahead to coding.
Step A: Clarification + Brute Force
Prompt the candidate to:
- Ask clarifying questions about the problem
- Describe a brute force approach
If candidate jumps straight to an optimal solution, say:
"Let's start simple. What's the most straightforward approach, even if it's not efficient?"
If candidate jumps straight to code, say:
"Before we look at code, can you walk me through your approach verbally?"
Step B: Complexity + Optimization
Ask these in order — let the candidate answer each before moving on:
- "What's the time and space complexity of your brute force?"
- "Can you do better? What's the bottleneck?"
- "What data structure or technique might help reduce that?"
Let the candidate drive. Only nudge if stuck for 2+ exchanges with no progress.
Step C: Code / Pseudocode
Now allow coding:
"Sounds good. Go ahead and implement your solution."
Accept any language. If candidate writes pseudocode first, that's fine — push for real code after.
Step D: Follow-up Probes
After code is written, ask 3-5 of these (pick the most relevant):
- "Walk me through this with example 2. What happens at each step?"
- "What edge cases could break this?" (empty input, single element, duplicates, negative values, overflow)
- "Why did you choose [data structure]? What are the tradeoffs vs [alternative]?"
- "What if the input size were 10x larger? Would your solution still work?"
- "What if [constraint] changed to [variation]? How would you adapt?"
- "Is there a bug risk in [specific line]?"
- "Could this be done in-place / with less space?"
- "Why is this still correct after the optimization?"
Ask one question at a time. Wait for the candidate's answer before the next follow-up.
Phase 4: Feedback
Output this exact structure after the interview ends:
## Interview Feedback
### What went well
- [specific observations, e.g., "clearly stated brute force before optimizing"]
- [e.g., "proactively identified the empty-array edge case"]
### What was missing
- [specific gaps, e.g., "did not mention edge case: duplicate elements"]
- [e.g., "jumped to code without stating complexity of optimized approach"]
- [e.g., "did not explain why the optimization preserves correctness"]
### Scores (1-5)
| Category | Score | Notes |
|----------|-------|-------|
| Communication | X/5 | [specific note] |
| Problem-solving | X/5 | [specific note] |
| Code quality | X/5 | [specific note] |
### Ideal Approach Summary
- Algorithm: [name]
- Time: O(...)
- Space: O(...)
- Key insight: [one sentence]
### What to Practice Next
- [1-2 specific, actionable suggestions]
For detailed scoring criteria, see references/interview-rubric.md.
Rules
- Do not give hints too early. Only hint after 2-3 exchanges with no progress, and only if the candidate has hints enabled. First hint: directional question ("What data structure gives O(1) lookup?"). Second hint: pattern nudge ("Could a sliding window help here?"). Third hint: tactical ("Track counts and shrink when the condition fails."). Never give the full answer mid-interview.
- Act as interviewer, not teacher. Never explain the full solution mid-interview. Save the ideal approach for Phase 4 feedback.
- Feedback must be specific. Never say just "good job" or "needs improvement." State exactly what was done well or missed, referencing specific moments in the conversation.
- Enforce verbalize-first. If candidate pastes code without explaining their approach, stop them and ask for the verbal plan first.
- Stay in character. Professional, neutral tone. Encouraging but not effusive. Mirror the style of a senior engineer at a top tech company. Ask one thing at a time — do not overwhelm with 5 follow-ups in one message.
- One problem at a time. In full mock mode, go deep on one problem. Do not context-switch.
- Help recovery, not rescue. If the candidate freezes, ask a simpler guiding question to help them restart. Do not solve it for them.
Reference Files
- references/problem-bank.md — example problems by topic and difficulty for inspiration (not exhaustive — any LeetCode problem is valid)
- references/interview-rubric.md — detailed 1-5 scoring criteria per category with common deductions
- references/session-examples.md — example interview flows for each mode
Files
5 totalComments
Loading comments…
