Meta | E5 | MLE | Passed | Menlo Park

meta logo
meta
MLEMenlo Park7 yearsOffer
August 26, 20242 reads

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:

  1. Binary Tree Vertical Order Traversal: No variations were present.
  2. 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:

  1. 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.
  2. 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:

  1. 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.
  2. 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)

Q1
Binary Tree Vertical Order Traversal
Data Structures & AlgorithmsMedium

Given the root of a binary tree, return the vertical order traversal of its nodes' values. (i.e., from top to bottom, column by column). I encountered this problem without any variations from the standard LeetCode version.

Q2
Minimum Remove to Make Valid Parentheses
Data Structures & AlgorithmsMedium

Given a string s of '(', ')', and lowercase English characters, remove the minimum number of parentheses so that the resulting parentheses string is valid. Return any valid string. The problem was presented as-is from LeetCode.

Q3
Sum of Node Values in Root-to-Leaf Paths (Variation of Sum Root to Leaf Numbers)
Data Structures & AlgorithmsMedium

This was a small variation of the 'Sum Root to Leaf Numbers' problem. Instead of calculating a number by multiplying digits by 10, the task was to sum the actual node values along each root-to-leaf path.

Q4
Timestamp with Maximum Meeting Overlap (Variation of Meeting Rooms II)
Data Structures & AlgorithmsMedium

This was a variation of 'Meeting Rooms II'. Instead of simply returning the maximum number of meeting rooms required, the goal was to return any timestamp that had the maximum overlap of meetings.

Q5
Minimum Cost Flight Departure and Arrival
Data Structures & Algorithms

This problem involved finding the minimum cost related to flight departures and arrivals. It was a specific problem I had found and studied previously from LeetCode discussions.

Q6
Shortest Path in Binary Matrix with Weighted Follow-up
Data Structures & AlgorithmsMedium

The initial problem was to find the shortest clear path in a binary matrix from the top-left to the bottom-right, where clear path cells are 0 and 8-directionally connected. There was a follow-up question for a weighted matrix, where each step's cost is the value of the cell itself.

Q7
Harmful Content Detection System Design
System Design

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.

Q8
Behavioral Questions (Various)
Behavioral

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.
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!