Technical interviews
Preparing for software and AI/ML technical interviews
By MockEra · Published
Technical interviews test what you know and how you reason where someone can hear it. Prepare both.
Coding rounds
- Restate the problem and ask about input size, empty input and duplicates.
- Say a simple solution first, then improve it.
- Name the time and space cost of what you wrote.
- Test with a normal case and an edge case before saying you are done.
For example, to find two numbers that add to a target, you can compare every pair, which takes quadratic time, or remember the numbers seen so far in a hash map, which takes linear time and linear extra space. Saying that trade-off aloud is part of the answer.
System design
Start with what the system must do and how much traffic it expects. Sketch the simplest design that meets that, then discuss where it breaks: the database, a slow dependency, or a failed machine.
AI and machine learning rounds
- Explain overfitting and how you would detect it with a held-out set.
- Choose a metric for an imbalanced problem and say why accuracy can mislead.
- Describe how you would check that test data has not leaked into training.
- For retrieval-augmented generation, separate retrieval quality from answer quality when you evaluate.
When you do not know
Say what you do know, state your assumption and reason from there. An honest “I have not used it, but I would expect…” is stronger than a confident guess.