Machine Learning Engineer Coding & Algorithms Interview Questions
Practice 316 real Coding & Algorithms interview questions for Machine Learning Engineer roles. From companies including Meta, Amazon, OpenAI, TikTok, Pinterest.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"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."
Find First Local Minimum
Given an integer array nums, find the index of the first local minimum. A local minimum is an element that is smaller than its immediate neighbors: - ...
Find a String Containing Another
Given a list of strings, determine whether any string in the list contains another string from the same list as a contiguous substring. Return one str...
Implement a Fixed-Capacity Deque
Design and implement a fixed-capacity double-ended queue. The data structure is initialized with an integer capacity k and must support the following ...
Solve Four Coding Assessment Tasks
Complete the following four independent coding tasks. 1. Find the day a cumulative visit target is reached You are given an array visits, where visits...
Count People Reaching the Boundary
You are given a 1-dimensional line segment with a right boundary at position L. There are N people with initial positions p1, p2, ..., pN, and there i...
Build Ranked Feed With Photo Batching
You are given a list of feed objects. Each object has: - id: a unique string - type: one of Normal, Video, or Photo - score: a numeric ranking score C...
Design Hierarchical Permission Checks
You are given a hierarchy of groups represented as a tree, for example World -> Country -> City. Each advertiser can be granted access at any group no...
Simulate Plant Infection With Controlled Burning
You are given an R by C grid of plants. Each plant is initially healthy, infected, recovered, or dead. A plant has up to four orthogonal neighbors. De...
Implement URL Shortening Codec
Implement a small in-memory URL-shortening component in a pair-programming interview. Expose two methods: shorten(long_url: str) -> str, which returns...
Find Top K Largest Numbers
This question evaluates proficiency with heap/priority-queue data structures, selection algorithms, and the ability to analyze time and space complexi...
Wrap Matching Substrings in Bold Tags
During a machine learning engineer phone screen, the coding task was: You are given a string text and a list of strings patterns. Return a new string ...
Count Islands in a Grid
This question evaluates skills in graph traversal and grid connectivity detection, testing competency in reasoning about adjacency, state management, ...
Design an Editable Text Buffer
This question evaluates data structure design, mutable state management, undo/redo semantics, and prefix-based autocomplete indexing with dynamic freq...
Simulate a rover fleet
This question evaluates skills in simulation design, state management, grid-based movement logic, and handling constraints such as obstacles, boundari...
Optimize a Fifteen-Sum Card Strategy
This question evaluates algorithmic problem-solving, debugging, simulation-based testing, and strategy optimization using techniques such as search, m...
Solve DFS grid and keypad problems
You may be asked to solve one or more DFS/backtracking problems: 1. Grid connectivity problem: Given an m x n grid where 1 represents land and 0 repre...
Merge overlapping weekly time intervals
You are given a list of time intervals representing meetings. Each interval is a pair of strings in the format: - "<Day> <H>:<MM>" (24-hour time) - <D...
Compute a moving average on a stream
This question evaluates understanding of streaming data structures, sliding-window aggregation, and the time/space trade-offs involved in maintaining ...
Maximize sum of non-adjacent values
Problem You are given an integer array nums representing the amount of money available at each house along a street. If you take money from house i, y...
Implement cache and merge intervals
This question evaluates proficiency in designing and implementing efficient data structures (a fixed-capacity LRU key-value cache) and interval-proces...