Common Interview Mistakes
Common interview mistakes are the repeated habits that lose marks even when the final code works. Most of them are pacing and communication habits, not gaps in knowledge.
Name the mistake and its fix
Each mistake pairs with one plain fix. Naming the fix turns a warning into a habit.
mistakes = [("code first", "clarify first"), ("silent coding", "think aloud"), ("no tests", "test small cases")]
for mistake, fix in mistakes:
print(mistake, "->", fix)Test the small cases first
Small cases expose the limits of a solution. Empty and single-item inputs are the cases most often skipped.
def has_pair(nums, target):
seen = set()
for num in nums:
if target - num in seen:
return True
seen.add(num)
return False
for case in [[], [5], [2, 7]]:
print(case, has_pair(case, 9))Count the cost of a slow plan
A slow plan that checks every pair costs far more than a single pass. Stating the count aloud shows the trade-off early.
n = 100
print("pair checks:", n * (n - 1) // 2)
print("single-pass checks:", n)Example
checklist = ["clarify the problem", "state the plan aloud", "test small cases", "check edge cases"]
for item in checklist:
print("[x]", item)
print("ready to present the solution")Key points
- Mistake: a repeated habit that costs marks, such as coding before clarifying.
- Silent coding: writing code with no spoken plan, so the interviewer cannot follow the reasoning.
- Use small test cases to catch errors before presenting a solution.
- Use edge cases, such as empty inputs and single-item inputs, to test the limits of a solution.
The checklist turns each common mistake into a step done before presenting. Clarifying and testing come before the final answer. Running the checklist takes a minute and prevents the most common lost marks.
Note
a correct answer presented with no reasoning scores lower than a reasoned answer with a small fix.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Python Playground
Exercise
Which of these is a common interview mistake?