How to prepare for a technical interview

Technical interviews for engineering roles test two things: whether you can solve problems in code, and whether you can explain your thinking while you do it. Both improve with practice, so the best preparation is a few weeks of steady work rather than a cram the night before.
Data structures and algorithms
Section titled “Data structures and algorithms”Know the common data structures (arrays, linked lists, stacks, queues, hash maps, trees, heaps and graphs), what each operation costs in Big-O terms, and when you’d pick one over another. Be comfortable with binary search, sorting, recursion, and breadth-first and depth-first traversal of trees and graphs. Practise writing them in the language you’ll use in the interview, such as Python or Java, so you aren’t fighting the syntax.
System design
Section titled “System design”For mid-level and senior software roles, expect a design question such as “design a URL shortener”. Review the building blocks: horizontal scaling, caching, load balancing, SQL versus NoSQL databases, replication and message queues. What interviewers look for is the trade-offs, for example why you’d add a cache and what happens when it goes stale, not a single right answer.
Timed coding practice
Section titled “Timed coding practice”Work through problems on LeetCode, HackerRank or Codewars. Time yourself so you get used to coding under pressure. Mix easy problems, which build speed, with harder ones, which teach you new patterns. When you can’t solve one, read a solution, then solve it again from scratch a few days later.
Thinking out loud
Section titled “Thinking out loud”Most interviews are on a whiteboard or a shared editor, and the interviewer is grading your process as much as the result. A routine that works:
- Restate the problem and ask about inputs, edge cases and constraints.
- Walk through a small example by hand.
- Describe a brute-force solution and its complexity.
- Improve it, then write the code.
- Test it against your example and the edge cases.
Mock interviews
Section titled “Mock interviews”Ask a friend or colleague to run a mock interview and treat it like the real thing, from introductions to the final questions. Afterwards, note where you got stuck or went quiet, and work on those areas before the next one.
The job’s tech stack
Section titled “The job’s tech stack”Read the job posting and make sure you can talk about the languages, frameworks and tools it lists. If you’ve used them, have a project ready to describe. If you haven’t, build something small with them before the interview.
Further reading
Section titled “Further reading”- Tech Interview Handbook: free guide covering coding interview patterns and behavioural questions
- System Design Primer: open-source collection of system design topics and example questions
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)