ML Interview Prepration Guide (Draft)
A collection of resources while preparing for MLE interviews at Meta or other big tech companies.
Not long ago, I transitioned from a Senior ML Scientist role at Microsoft to a Machine Learning Engineer position at Meta, and the journey was anything but quick. The preparation process was extensive, especially since it was my first experience with LeetCode-style coding interviews and ML system design interviews. While there are many resources available for preparation, I’ll be sharing the ones that helped me navigate and succeed in this challenging process.
I will try to cover the following -
Interview Process Overview: Break down the entire interview process, from initial screenings to the final onsite interviews, and share tips on what to expect at each stage.
Coding Interviews: Dive into the LeetCode-style coding interviews,how I prepared for them, and the strategies that worked best for me.
ML System Design Interviews: Explore the ML system design interviews, offering insights into the key concepts you need to know, how to approach open-ended design problems, and the resources that helped me build a strong foundation.
Behavioral Interviews: Finally, I’ll talk about the behavioral interviews, and how I prepared to effectively communicate my past work and problem-solving approach.
1 Interview Process Overview
The interview process typically starts with a screening round, followed by a more extensive onsite round.
For the phone screen, the format varies depending on the level you’re interviewing for:
- E4/E5:
- 5 min: Introduction
- 35 mins: Two leetcode coding problems (Easy/Medium)
- 5 mins: Questions for interviewer
- E6:
- 2 min: Introduction
- 25 mins: One or Two leetcode coding problems
- 15 mins: Behavioral interview
- 3 mins: Question for interviewer
Once you clear the phone screen you will be invited for on-site interviews which includes coding round, ML system design round and behavioral round. Again the composition varies depending on the level you’re interviewing for:
- E4/E5:
- 2 coding rounds
- 1 ML system design
- 1 Behavioral
- E6
- 2 coding rounds
- 2 ML system design
- 1 Behavioral
The level of preparation required for both phone interviews and onsite rounds is similar.
While performance in coding round are bare minimum you need to pass the loop, leveling is decided by how well you do in system design and behavioral round.
Next, we’ll dive deeper into each type of interview and explore how to best prepare for them.
2 Coding Interviews
Coding round interviews unsurprisingly focus heavily on coding. A typical Interview structure looks like the following -
- 5 min: Introduction
- 35 mins: Two leetcode coding problems
- 5 mins: Questions for interviewer
You are mostly expected to code on a plain text notepad with execution disabled. To get a more realistic idea of how a coding interview environment look like watch this mock interview by interviewing.io -
2.1 A Structured Approach to Solving Coding Problems in Interviews
When tackling a coding problem, following this structured approach can be very helpful:
Ask Clarifying Questions(~3mins): When the problem is presented, read it aloud to ensure you fully understand the requirements before jumping to a solution. Ask follow-up questions to clarify any ambiguities. This might involve discussing test cases, considering edge cases, and understanding the expected input range or type. For example, think about how the solution should handle null inputs or extreme values. Ideal state is to get an alignment with your interviewer by writing out some test cases and expected output for the same.
Plan Your Approach(~5 mins): Outline your solution strategy and explain it to your interviewer while typing it out in the shared text window. Break down the problem into smaller parts if possible, and decide on the most appropriate algorithm or data structure and discuss any trade-offs you are making and write down potential time and space complexity of the solution you are proposing. Once your interview agree with your approach and then ask permission to code it out.
Write the code(~5 mins): Implement your solution, keeping your code clean and well-organized. As you code, ensure that you handle edge cases. Make sure to name your functions, classes and variables appropriately so anybody reading your code can follow.
Pseudo run your solution(~2 mins): Manually run your code against various test cases while explaining it to your interviewer, including both typical and edge cases, to ensure it behaves as expected. This will help you find potential bugs and an opportunity to correct them before your interviewer points it out.
Close(~2 mins): Explain time and space complexity of the solution and answer any followup questions your interviewer might have.
By following these steps, you can effectively navigate coding problems and demonstrate a clear, methodical problem-solving approach.
As you can see from above, coding rounds are really fast paced and you need to be well prepared to get through it. That brings us to prepration.
2.2 How to prepare for coding interviews
Here is a simple guide on how to prepare -
Purchase a leetcode subscription - This website is the only paid resource you need to prepare for coding interviews.
Getting started with Leetcode learn - If you are like me who doesn’t come from a CS degree then going through Leetcode learn cards is a good starting point. Here is the structure I followed-
- Array
- Linked List
- Stack & Queue
- Array & Strings
- Binary Tree
- Binary Search
- Binary Search Tree
- Heap
- Graph
- Sorting
- Dynamic Programming
Following Neetcode.io Roadmap- This roadmap contains 75 leetcode questions which will familiarize you with common coding patterns useful in coding interviews
Solving company tagged questions - On leetcode.com you can filter for the company you are interviewing and see top tagged question for the same. I would recommend solving top 100 tagged questions based on frequency which are asked in last six months.
Practice - Once you are done with the above then you can practice timed assessment on leetcode.com for your specific employer or generic ones if not listed. If you want more realistic practice then you can buy some mock interviews on interviewing.io where an engineer from top tech company will take your mock and provide feedback on your performance.
3 Machine learning System Design
4 Behavioral Interviews
5 Conclusion
Preparing for this was the most time-consuming part for me, especially since I don’t come from a CS background. Even though I was working as an ML scientist at Microsoft, I had not encountered these types of problems in the real world. Nonetheless, mastering these concepts is essential for high-tech roles, so it’s worth investing the time to prepare thoroughly.
I hope you enjoyed reading it. If there is any feedback on the code or just the blog post, feel free to comment below or reach out on LinkedIn.