Meta Machine Learning Engineer Interview Questions
Practice the exact questions companies are asking right now.
Design weapon-selling ad detection from posts
ML System Design: Detect weapon-selling ads from user posts You work on a platform with user-generated content (UGC): posts may include text, images, ...
Answer impact, conflict, and difficult coworker questions
Behavioral questions 1. Describe the most impactful project you have worked on. 2. Tell me about a difficult person you have worked with. 3. Describe ...
Solve shipping capacity and expression insertion
Problem A: Minimum shipping capacity You are given an array weights where weights[i] is the weight of the i-th package. Packages must be shipped in or...
Compute nested depth sum and grid distance
Problem A: Weighted sum of integers in a nested list You are given a nested list structure that may contain integers or other nested lists. Define the...
Answer core behavioral questions using STAR
Prepare structured answers (use STAR: Situation, Task, Action, Result) for the following common behavioral prompts: 1. Most proud project: Describe a ...
Design comment ranking for a news feed
Design an ML-powered system to rank comments under posts in a news feed product. Requirements - For each feed item (post/story), users can open the co...
Implement weighted random city and sparse dot product
Question 1: Weighted random city picker You are given a mapping from city → population (all populations are positive integers). Implement a random gen...
Solve linked list, tree, and grid problems
Problem A — Find cycle entry in a singly linked list You are given the head of a singly linked list. The list may contain a cycle. - Return the node w...
Solve two linked list/array tasks
You are given two independent coding tasks. Task 1: Remove the N-th node from the end of a singly linked list Given the head of a singly linked list a...
Design recommendation and weapon-ad detection systems
You are asked to design two end-to-end ML systems. 1) Personalized recommendation system Design a system that recommends items (e.g., videos/products/...
Solve array merge, tree view, and maze tasks
Solve the following coding tasks. 1) Merge two sorted arrays in-place You are given two integer arrays A and B, each sorted in non-decreasing order. -...
Design versioned in-memory key-value store
You are asked to design an in-memory key–value store that supports versioning and rollback. Requirements - Store key–value pairs in memory (string key...
Find longest palindromic substring
Given a string s, return the longest contiguous substring of s that is a palindrome. Input - A single string s. Output - A string representing the lon...
Design concurrent expiring job registry
Design (and discuss how you would implement) an in-memory job registry that supports concurrent access. Each job has a unique jobId and an expiration ...
Build harmful-content text classifier
You are given a text dataset and asked to build a model that predicts whether a piece of content is harmful (binary classification). Task - Propose an...
Find target using robot movement API
You control a robot in an unknown 2D grid. The grid layout and boundaries are unknown, and you cannot access the map directly. Some cells are blocked ...
Optimize repeated-value vectors and compute exclusive times
You are given two separate coding tasks from an interview. Task 1: Optimize storage for vectors with repeated values, then compute dot product You are...
Merge two sorted arrays in-place
You are given two nondecreasing arrays A and B, where A has enough trailing empty slots to hold all elements of B. Merge B into A in-place so that A r...
Find kth smallest pair sum with heaps
You are given two nondecreasing arrays A (length n) and B (length m) of non-negative integers and an integer k (1 <= k <= n*m). Return the k-th smalle...
Describe handling intense time pressure
Behavioral & Leadership (Onsite): Thriving Under Time Pressure and Multitasking Prompt Tell me about a time you had to deliver high‑quality work under...