Meta | E5 | MLE | Passed | Menlo Park
Summary
I successfully navigated the interview process for an E5 Machine Learning Engineer position at Meta in Menlo Park. After two months of dedicated preparation, I received an offer following a phone screen and a full onsite loop.
Full Experience
I approached this as my very first coding interview, and after learning immensely from the LeetCode community, I am now sharing my experience, which I hope will be particularly useful for beginners.
Interview Timeline
- Mid-June: Reached out by HR.
- Mid-July: Phone Screen completed, received a pass email the next day.
- Mid-August: Onsite interviews concluded, received the offer call after 5 business days.
Phone Interview
My phone screen consisted of two standard LeetCode problems:
- Binary Tree Vertical Order Traversal: No variations were present.
- Minimum Remove to Make Valid Parentheses: The interviewer pointed out that my initial solution was not optimal. Luckily, I managed to figure out an optimal approach during the interview.
I solved both questions within 40 minutes.
Coding Interview 1
This round also had two problems, both with minor variations:
- Sum Root to Leaf Numbers: The variation was to sum the actual node values along root-to-leaf paths, rather than numbers formed by digits. I solved this optimally within 10 minutes and provided correct time and space complexity.
- Meeting Rooms II: The variation asked me to return any timestamp that had the maximum overlap, instead of just the maximum number of meeting rooms. I needed a small hint to recognize it as a Meeting Rooms problem and had a bit of a struggle returning the specific timestamp. My solution worked but felt a bit 'ugly'. I solved it in about 30 minutes, providing correct time complexity.
Coding Interview 2
This round also involved two questions, and I felt great about my performance here:
- Minimum Cost Flight Departure and Arrival Problem: This was a problem I had previously dug up from discussions. I solved it optimally within 5 minutes, which reinforced the value of spending hours researching common problems.
- Shortest Path in Binary Matrix: I solved this optimally within 15 minutes. The interviewer was quite satisfied that I completed two questions so quickly.
For the Shortest Path problem, the interviewer followed up with a weighted matrix variation (where each step's weight is the matrix cell's value). I didn't initially realize I could use BFS + Heap (Dijkstra's) and instead coded a DP solution. My DP solution might have had some uncovered corner cases, but the back-and-forth discussion went very well, and I explained my intuition clearly. By the end, I felt relaxed, like I was discussing with a teammate rather than being interviewed.
ML System Design
The topic was something related to harmful content detection. I followed a structured approach, but I was flexible and didn't stick exactly to a 'book' answer. We covered all the essential components and stretch questions within 40 minutes. I believe it's crucial to be adaptable, ready to deep-dive into specific areas the interviewer is interested in, and then pull back to the broader picture when necessary. Interestingly, we didn't use a whiteboard tool at all, which the interviewer was perfectly fine with.
Behavioral Interview
I was asked around 6-7 behavioral questions. Fortunately, all the questions were ones I had prepared for, and the interviewer delved into the details for each of my answers. The interviewer actually ran out of questions after 40 minutes!
Interview Questions (8)
Design a system for detecting harmful content. The interview focused on key components, scalability, and handling various aspects of such a system. I was expected to follow a structured design approach but also be flexible and adaptive to the interviewer's specific areas of interest.
I was asked approximately 6-7 behavioral questions covering various scenarios, typical of Meta's interview process. The interviewer often dug deeper into my responses, seeking more details.
Preparation Tips
Coding Preparation
I had almost no LeetCode experience two months prior to my interviews. From the day HR reached out, I focused intensely on coding preparation:
- Followed NeetCode's roadmap religiously.
- Tackled the top 150 tagged questions on LeetCode.
- Researched and practiced questions from the past 6 months found in LeetCode discussion forums related to Meta interviews.
ML System Design Preparation
My strategy for ML System Design was two-fold:
- I read through the book "Machine Learning System Design Interview" by Ali Aminian and Alex Xu twice.
- Utilized ChatGPT to generate lists of interview questions on specific ML topics, which proved very effective in deepening my understanding.
Behavioral Preparation
For behavioral questions, I searched for common questions and prepared concrete answers in advance, ensuring I could elaborate on my experiences effectively.
General Notes & Tips
- Practice with CoderPad: I highly recommend using CoderPad to practice. Always write down your intuition, preferably with a test example, before starting to code. During my phone screen, I instinctively typed 'class Solution' but was prompted by the interviewer to explain my thoughts thoroughly first.
- Don't Be Afraid to Seek Solutions: As a beginner, it's normal not to solve every new problem independently. My approach was to first check if NeetCode had a solution. If not, I'd consult the Editorial. ChatGPT was also a great tool for explaining complex code.
- Focus on Optimality and Speed for Meta: Meta heavily emphasizes optimal solutions and coding speed. It's incredibly stressful to realize your prepared solution isn't optimal during the interview. ChatGPT can be useful for optimizing code.
- Luck Plays a Role: While preparation is key, acknowledge that luck is a factor. Do your best and let the rest unfold.