Interview Prep: The Coding Grind
- Jenya's AI Interview Prep Notes
- Sell Me This Pen
- The Coding Grind
- The ML Grind
- Classic System Design
- Just Chatting
- Keep At It
Classic DSA (Big Tech: Meta/Amazon/Microsoft/etc)
LeetCode pattern matching.
Messy "real-world" problems (New Big Tech: OpenAI/Anthropic/etc)
Incomplete specs, debugging, data processing, often inside an existing codebase. Hard to prepare for because they’re extensive. ALWAYS ask the recruiter for prep material, and make sure you have at least two full weeks before the interview. These are some of the hardest interviews due to their novelty.
Simple coding (startups/referrals)
Covers basic coding ability. Can be prepped as part of the classic prep loop.
Practice Process
- Pattern recognition: LeetCode is a grind. There’s a finite set of patterns, learn them all. Use something like NeetCode; plenty of sites exist, but this one was sufficient for me.
- Go over the text and solve problems without looking at the explanation.
- Get LeetCode Premium for more material and company-tagged questions. Pair it with NeetCode lists, most of NeetCode exercises link to LeetCode where I’d recommend to consolidate most of your practice.
- Some people also find LeetCode assessments useful as a mock interview tool to gauge their current coding level.
- Timing:
- 5m — clarify and restate the problem, always write down at least one example
- 20m — implement
- 10m — test
There’s not much time to think, classic interviews expect smooth execution. You have to memorize patterns and be fast at implementing them.
- Get a physical timer2.
- Most companies use CoderPad. Avoid hotkey issues, take NeetCode problems and implement them in CoderPad (including tests), here is a temporary sandbox you can use, no registration is required: https://app.coderpad.io/sandbox
- Because not all interviews provide test cases, I recommend becoming comfortable quickly writing your own using Python’s standard unittest library. I usually rely on
unittest.main(verbosity=2, exit=False)to run them.
- Because not all interviews provide test cases, I recommend becoming comfortable quickly writing your own using Python’s standard unittest library. I usually rely on
- Use prints - you will eventually hit a tricky edge case that’s hard to reason about in your head. Make sure you can add targeted print statements without cluttering the output or confusing yourself. Well-formatted debug output is incredibly valuable, it has saved me in every coding interview loop where I had a partial solution with some tests still failing.
- If you get stuck, copy-paste your solution into your chat-bot and ask for iterative hints. It’s also helpful to ask for an intuitive explanation of how a given solution works.
- For messy, "real-world" style interviews, paste the prep material you received from the recruiter and ask chat-bot to generate variations of the problems, for example: fill in the gaps, find and fix five bugs, etc.
A nice thing about the leetcode and coderpad editor is you can configure vim/emacs keybindings in them, they are clunky but better than nothing.
I liked using this timer↩
