Prepare for ML Engineer Interview

Başak Tuğçe Eskili
Marvelous MLOps
Published in
5 min readNov 18, 2023

It’s becoming clear that companies relying on data need ML Engineers. The role is relatively new (5+ yrs), and so are the interviews. It’s not exactly being a software engineer, or data scientist.

Recently, I have done some interviews with different companies for ML Engineer positions.

In this article, I’ll share what those interviews were like and what I learned from them, to give you some insights.

Coding Interview

This is inevitable if you are aiming for a job at a tech company. You need to prove your coding skills. I was familiar with these interviews from my days in software engineering. It seems they’ve borrowed this interviewing style from the regular software engineering process.

Study the basics:

  • Data Structures: Arrays, Linked Lists, Stacks, Queues, Binary Trees, Graphs, Hash Tables, Heaps.
  • Algorithms: Breadth First Search, Depth First Search, Binary Search, Merge Sort, Tree Insert / Find, Quick Sort
  • Some Concepts: Bit Manipulation, Memory (Stack vs. Heap), Recursion, Big-O Time

Practice coding:

LeetCode, HackerRank, or CodeSignal.

I have prepared from LeetCode. Questions from this list are very helpful. The more questions you solve, the more likely that you’ll get a similar question. When solving these questions, practice explaining what you are doing. Interviewers do not only want to see you coding but also talking. Make it easy for interviewers to understand your solution. Practice answering questions around Big-O time. There is an amazing YouTube channel where many of LeetCode’s questions are solved and explained: NeetCode.

Depending on your background, you might need weeks to prepare for only the coding part. I always think it’s all about preparation. With enough coding exercise, anyone can pass this part. What is enough for you, can vary a lot. Some need weeks, others months.

Oftentimes, you get to choose the programming language. Make sure to check with the interviewers if that’s the case.

I’ve had coding interviews where I was expected to write functional code with the right output, and others where I only needed to write pseudo-code and explain it well. My advice: prepare to write clear, accurate code, and be ready to explain it thoroughly.

In non-tech companies, this part may be less harsh, or even skipped. Sometimes, they send online assessments where coding questions are asked within a given time. In that scenario, it’s important to submit a code that compiles and runs without an error.

System/ML System Design Interview

Just like coding interviews, this is also a must in tech companies. I have seen several versions, the version that is taken from the software engineer interviewing process, the system design interview, and the version that is modified specifically for the ML system.

System Design: For this one, you can find hundreds of resources since tech giants have been conducting them for over a decade.

You are expected to design systems like chat apps, video storage apps, or maps, starting from a high-level overview and delving deep. I’ll add some links to great resources for this type of interview:

System design interview guide

Bytebytego

ML System Design: This is an interview focused on specifically designing systems for ML applications. For this one, you are expected to draw an end-to-end solution for an ML application, that includes everything from input and data storage to training, serving, retraining, and generating outputs. For this type of interview, I found this book very helpful: Bytebytego

Additionally, depending on the company that you are interviewing for, it’s important to have knowledge of algorithms. Understanding algorithms related to recommender systems, demand forecasting, search mechanisms, and similar areas can be very helpful for these interviews.

ML Theory

Some companies assess your ML basics knowledge. Even if you’ve been in the field for years, don’t underestimate this part.

Expect questions about neural networks, optimization algorithms, decision trees, evaluation metrics, and types of errors, among others. You’ll find plenty of resources online by searching for ML or data science interview questions.

ML Interview Questions

ML Engineer Interview Questions

They also ask you to explain a project you’ve worked on and go into specific questions about it. Which algorithm you used, why you chose them, how you implemented them, what were the most challenging aspects etc. Select a project you’re comfortable talking about and prepare for this part of the interview.

Take-home assignment

Sometimes, you get a take-home assignment that you are expected to finish in a few days. They want to assess your ability to write clear code and explain the findings. It can be a data science use case where you build a model with the given data. For these ones, Kaggle is a great resource. It can also be an end-to-end design with a tool of your choice. What you need to pay attention to: choose a good model and explain why. Show the results, and explain them well. They want to see your communication ability, can you explain your approach clearly?

If you make assumptions, tell them and explain. They also assess your knowledge of common ML packages, such as scikit-learn, pandas, NumPy, TensorFlow, and PyTorch. Write easy-to-read clean code in an organized manner.

Behaviour

This is the non-technical interview, often with the hiring manager. Still, it’s good to be well-prepared. In this interview, you’ll get questions about your strengths, weaknesses, and experience in different situations. It’s wise to visit these common questions and have some answers ready: Behavioral interview questions

I’m sure there are people who can immediately answer a question like “What project are you most proud of? How did you handle conflict or disagreement with a colleague? How do you accept & give feedback?”. For me it was really helpful to be prepared for these common questions.

Conclusion

Don’t hesitate to ask questions about the interview specifics with HR, the recruiter, or your interviewer. They’re there to guide you to prepare, not trip you up. These interviews are about seeing your potential, and they want you to be able to show it the best. Good luck!

Some resources to boost your knowledge:
https://huyenchip.com/ml-interviews-book/

https://medium.com/swlh/cheat-sheets-for-machine-learning-interview-topics-51c2bc2bab4f

--

--