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."
Implement rotating homepage title selector
This question evaluates understanding of data structures and algorithms for prioritized selection with stateful constraints, focusing on maintaining d...
Implement Depth-First Search Traversal
This question evaluates implementation and conceptual understanding of graph traversal algorithms, specifically depth-first search on adjacency-list r...
Find Windows Containing a Target
This question evaluates array traversal and interval-containment reasoning, including handling inclusive endpoints, overlapping intervals, and preserv...
Debug a PyTorch U-Net shape mismatch
This question evaluates proficiency in PyTorch model implementation, convolutional output shape arithmetic, channel configuration, and debugging of U-...
Sample a string by real-valued scores
This question evaluates probabilistic sampling, numerical stability, and algorithmic implementation skills for weighted selection under floating-point...
Find target-heavy sliding windows
This question evaluates array manipulation, counting and efficient algorithm design—focusing on the sliding-window technique for detecting and quantif...
Marketplace Data Store: Order Matching and End-of-Day Reconciliation
Marketplace Data Store: Order Matching and End-of-Day Reconciliation You are building the core of a marketplace where sellers list individual units of...
Find Banks From Identifier Mappings
Plaid receives institution metadata from multiple sources. You are given two mappings: 1. code_to_institution: a one-to-one mapping from a bank code t...
Determine Whether Courses Can Be Completed
You are given an integer numCourses, representing courses labeled from 0 to numCourses - 1, and a list prerequisites. Each prerequisite is a pair [cou...
Maximize sum with no adjacent elements
Given an array of non-negative integers nums, choose a subset of elements such that no two chosen elements are adjacent in the original array. Return ...
Weighted Random Sampling by Index
Weighted Random Sampling by Index You are given an array of positive integer weights weights, where weights[i] is the weight assigned to index i. Impl...
Solve array merge, tree view, and maze tasks
This question evaluates array manipulation and in-place algorithms, binary tree traversal and visibility reasoning, and grid graph traversal for path ...
Extend a Maze Solver
This question evaluates proficiency in implementing and debugging graph search algorithms and state-space modeling, including correct visited-state ha...
Find Earliest Train Route
You are given a discrete train timetable and need to find a valid route through the train network. Each train has an itinerary represented as a sequen...
Implement Rate-Limited Wikipedia Crawler
Implement a rate-limited Wikipedia crawler. You may use an AI coding assistant during the interview, such as Cursor or Claude Code. You are expected t...
Minimize batches and allocate riders by time
This question set evaluates algorithmic problem-solving in scheduling and resource allocation, assessing understanding of batching under capacity and ...
Find and count target-sum subarrays
Find and count target-sum subarrays Given an integer array nums and an integer target, implement: ( 1) a function that returns true if any non-empty c...
Solve matrix diagonal and sliding-window statistics
Solve matrix diagonal and sliding-window statistics 1) Given an m x n integer matrix, determine whether every top-left to bottom-right diagonal has th...
Implement an LRU Cache
This question evaluates a candidate's competency in designing efficient cache mechanisms and managing time and space complexity for operations require...
Implement LRU cache and copy random list
This question evaluates competency in data-structure design, pointer and memory management, and hashing-based eviction policies by combining a deep-co...