Interview craft practice questions
How to run a coding interview from the first question to the last test: clarifying, choosing a pattern, talking while you code, dry runs and testing.
– interview-ready · 8 questions in this topic
– of 8 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- Spotting the pattern from the questionPick the fix
- The first five minutes of a coding interviewOrder the steps
- Brute force first, then improvePredict
- Count position pairs whose values differ by exactly kPredict
- Talking while you codePick the fix
- Dry run: the first day an account is overdrawnPredict
- Testing your own code in an interviewPredict
- What to do when you are stuckOrder the steps
Practise this topic
Flashcards · 18
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 8 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 1 set
Timed, out loud, then tick what you covered. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
Rubric areas
Most coding interviews are scored on four areas: communication, problem solving, technical competency (code quality and correctness) and testing.
Input limits hint at cost
Limits around 10⁵ usually rule out O(n²); limits around 20 make 2ⁿ approaches realistic.
assertfor quick testsA few
assert f(x) == ylines after your function show tests without any framework.Python's
breakpoint()breakpoint()(Python 3.7+) opens the debugger at that line; in an interview, a printed trace is usually clearer.Dry run
A dry run is executing your code by hand on a small input, writing down each variable after every step.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Topic outline informed by the Tech Interview Handbook by Yangshun Tay and the NeetCode 150 pattern grouping by neetcode-gh, both MIT licensed. Every problem, solution and explanation is written by Best Latest Apps. Credits and license