Meta Machine Learning Engineer Coding & Algorithms Interview Questions
Practice 56 real Coding & Algorithms interview questions for Machine Learning Engineer roles at Meta.

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Solve Two String Problems
The interview included two coding questions: 1. Exactly one edit apart Given two strings s and t, determine whether they are exactly one edit apart...
Build a Friend Recommender
You are given a simple social-graph codebase where each user has only an id and a collection of current friends. Starting from existing functions and ...
Optimize a Fifteen-Sum Card Strategy
You are given a simulator for a card game with 36 cards: ranks 1 through 9 in four suits. The table starts with 16 random cards. A move removes any 3 ...
Debug and optimize a card-drawing strategy
You are given a simplified card game engine with unit tests. The game is played using a table of face-up cards; each card has an integer value. On eac...
Compute the next lexicographic permutation
Problem Given an integer array nums representing a permutation of its elements, modify the array in-place to produce the next lexicographically greate...
Implement weighted random sampling with preprocessing
Weighted Random Sampling (with performance follow-up) You are given an array of positive weights w[0..n-1]. Implement a data structure that supports: ...
Solve Three Algorithmic Problems
Three coding questions were mentioned: 1. Second-largest distinct permutation Given an array of integers that may contain duplicates, consider all ...
Solve four OA string/array/matrix/graph tasks
You have 4 independent coding tasks. 1) Uppercase vs lowercase count difference Given a string s consisting of ASCII letters (and possibly other chara...
Implement exponentiation and fill grid distances
You are given two separate coding tasks. Task 1: Implement fast exponentiation Implement a function pow(x, n) that returns \(x^n\). - Input: - x: a ...
Find shortest path in a maze grid
Maze shortest path You are given a 2D grid maze of size m x n where: - 0 represents an open cell - 1 represents a wall (cannot pass) You are also give...
Maximize unique characters from a word list
Maximize Unique Characters From a Word List You are given a list of strings words. You may select any subset of these strings (each string used at mos...
Maximize concatenation length with unique chars
Coding: Maximum-length unique-character string You are given an array of strings arr. You may choose any subset of these strings and concatenate them ...
Solve Tree Views, Columns, and Calculator
The interview note referenced three separate coding tasks. Solve each task independently. Task 1: Binary tree side views Given the root of a binary tr...
Solve frequency and tree-completeness problems
Problem A: Return the k most frequent values You are given an integer array nums and an integer k. Task: Return the k distinct values that occur most ...
Solve Merge Lists and Vertical Traversal
Two coding tasks were mentioned for a 40-minute round: 1. Merge multiple sorted linked lists: You are given an array of k singly linked lists, where e...
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...
Find two numbers summing to target without hashmap
Problem Given an integer array nums (length n) and an integer target, return the indices (i, j) such that: - i != j - nums[i] + nums[j] == target You ...
Implement LRU cache and copy random list
Coding questions (two parts) Part A — Deep copy a linked list with random pointers You are given the head of a singly linked list where each node has:...
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...
Deep copy a linked list with random pointers
Problem You are given the head of a linked list where each node has: - val: integer value - next: pointer to the next node (or null) - random: pointer...