Meta Careers: How I Got My Job As a Facebook Machine Learning Engineer

Meta Careers: How I Got My Job As a Facebook Machine Learning Engineer

Rahul Agarwal recalls how he got his job as a machine learning engineer at Facebook. This is his story as he told it in HackerNoon, lightly edited and republished with permission.

I was already interviewing at Amazon and Google in India for data science and machine learning roles, respectively. Then, my manager advised me to apply for a position at Facebook in London. I contacted a recruiter on LinkedIn who introduced me to another recruiter to start the process.

Meta Careers: How Facebook hires machine learning engineers

Facebook has a different process from other companies when hiring machine learning engineers. There are coding rounds, system design and machine-learning design job interviews.

This was my approach to the machine-learning engineer job interview at Meta.

Facebook telephone interview

The telephone interview at Meta is a very basic data structure interview. The interview was a 45-minute video call to see whether it would be worthwhile to bring you to the on-site job interviews.

I was given two very basic array and dictionary-based problems to solve. The job interviewer shared a CoderPad link, and I had to solve the problems in any coding language of my choice (not pseudocode) without any bugs or code format options. I was asked about time-based and space-based constraints as well.

I came up with a bad running time like O(n³), and the interviewer asked if I could do better and gave hints when needed.

Practice these problems:

  • Monotonic Array: An array is monotonic if it is either monotone increasing or monotone decreasing. Return true if and only if the given array A is monotonic.
  • Valid Palindrome: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases

At a bare minimum, I recommend preparing these topics:

  • Data Structures: Array, Sets, Stack/Queue, Hashmap/Dictionary, Tree/Binary Tree, Heap, Graphs
  • Algorithms: Divide-and-Conquer, DP/memoization, Recursion, Binary Search, BFS/DFS, Tree traversals

After my telephone interview, the recruiter responded after one day to set up a call to explain the on-site job interview process. The on-site job interview was in London, and I was excited about an all-expenses-paid trip to London. I took an interview in two months so that I could prepare. The visa and entire process ended up taking longer than that.

Facebook on-site job interview

I started my day in London at around 9 a.m., a full hour before the scheduled time, because I was anxious and wanted to be on time. The recruiter shared the itinerary, which included five rounds of job interviews. It was the most organized job interview I have had.

1. Facebook on-site coding round: Data structures

The data structure questions were more difficult, and I spent a lot of time formulating the approach and discussing the time and space complexities of the solution.

I was asked to complete a medium-level string problem and a binary search problem. Practice these problems:

  • Complex Number Multiplication: Given two strings representing two complex numbers. You need to return a string representing their multiplication.
  • Kth Smallest in sorted Matrix: Given a n x n matrix where each row and column is sorted in ascending order, find the Kth smallest element in the matrix.

I coded on my own laptop. Remember: They don’t allow any code formatting and integrated development environments. I wrote code on a basic editor.

2. Facebook second on-site coding round

I had 40 minutes to complete two hard-level problems in the second on-site coding round. Though the interviewer gave me hints to steer me toward the right data structure and algorithm, I could only solve the first problem and most of the second problem.

Practice these problems:

  • API-based Time-Based Key-Value Store: Create a key-value store class that supports two operations—set and get.
  • Merge k-Sorted Lists: You are given an array of k-linked lists, with each linked list sorted in ascending order. Merge all linked lists into one sorted linked list and return it.

During the coding job interview, I recommend calling out solutions and the time complexity involved. Only start writing code once you both agree on a good solution.

It is helpful to talk to the job interviewers and explain your approach. They sometimes provide hints or stop you from going on a tangent. The job interview should be collaborative, and I think that is one of the qualities interviewers are looking for in a candidate.

3. Facebook third on-site coding round: System design

You are expected to create a service end-to-end on a whiteboard in the system design interview. Some example problems for you to think through:

  • How would you design Netflix?
  • How would you design YouTube?
  • How would you design Twitter?

The system design job interview is open-ended. There are no wrong answers. Here’s the approach you might want to take:

  • Design a very basic system. It should resemble the platform and have basic functionality. It might involve drawing boxes for a server, client and database on a whiteboard.
  • Create a list of features. The sky is the limit. For example, you might include following another user on a social network or booking a ride on Uber.
  • Add features. Expand on the basic design during the job interview. Discuss how you would handle scaling, edge cases, and the data structures and databases involved.

The most important thing in the system design interview is to drive the discussion with minimal input from the job interviewer. The interviewer might request a specific feature, but in the end, it is your system.

4. Facebook behavioral job interview

The Facebook behavioral job interview looks at how you handle difficult situations. Prepare for the job interview by assimilating and organizing your past work experiences, the problems you faced, and your solutions.

Frame small stories before the job interview. Think through the good and bad experiences and have a natural discussion with the interviewer.

5. Facebook machine-learning system design interview

In Facebook’s machine-learning system design job interview, I created a system to solve a machine learning problem end-to-end.

The job interviewer assesses your ability to convert a business problem into a machine learning system. You might be given a problem statement like developing a system to create a newsfeed using machine learning or filtering out toxic comments.

You would then need to design a system end-to-end while talking about various aspects of data and data collection, exploratory data analysis, feature engineering, model evaluation, model testing, putting the model in production, and maintenance and feedback.