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."
Generate Instructions for a Blind Maze Robot
You are given a known 2D maze grid with m rows and n columns. Each cell is one of: - #: wall - .: empty cell - E: the exit, which appears exactly once...
Find Maximum Path Sum in N-ary Tree
You are given the root of an N-ary tree. Each node contains an integer value and a list of zero or more children. A path is a sequence of nodes where ...
Implement BST Iterator and Ticket Queue
This question evaluates understanding of binary search tree traversal and iterator design with amortized time and space analysis, as well as dynamic p...
Compute minimum path sum in a triangle
This question evaluates proficiency in dynamic programming and algorithmic problem-solving within the Coding & Algorithms domain, focusing on handling...
Deep copy a linked list with random pointers
This question evaluates understanding of linked-list structures, pointer/reference manipulation, deep versus shallow copying, and the ability to analy...
Design O(1) cache and moving average
This question evaluates proficiency in data structures and streaming algorithms by combining an O(1) cache design with an eviction policy and a fixed-...
Find shortest path in a maze grid
This question evaluates proficiency in graph traversal and shortest-path reasoning on grid-based data structures, testing skills in pathfinding, state...
Count connected delivery zones
Given an m x n grid representing a service area, each cell is either 'Z' (deliverable zone) or '#' (blocked). Two 'Z' cells belong to the same zone if...
Compute longest increasing subsequence
Longest Increasing Subsequence: length, reconstruction, and counting Given an integer array nums, do all of the following: 1. Length. Compute the leng...
Implement string/matrix simulations and counting pairs
This multi-part question evaluates implementation skills in string processing (case-insensitive substring matching), grid simulation with iterative ma...
Support room moves and query top-k fastest
This question evaluates understanding of dynamic data structure design and ordering semantics, specifically maintaining per-room FIFO arrival order, c...
Implement trie-based autocomplete
This question evaluates understanding and implementation of trie data structures for prefix-based retrieval, testing competencies in string algorithms...
Implement exponentiation and fill grid distances
This question evaluates algorithmic problem-solving skills in the Coding & Algorithms domain, specifically numeric algorithms for fast exponentiation ...
Implement a Lazy Array
This question evaluates understanding of lazy evaluation and deferred computation, implementation of iterator/generator-like abstractions, and the abi...
Support updates and count target-sum pairs
This question evaluates data structures and algorithmic skills for dynamic pair counting, focusing on frequency management, efficient update handling,...
Compute minutes since last train departure
This question evaluates time arithmetic and handling of cyclic day-wrap boundary conditions along with parsing and comparison of timestamp lists, refl...
Compute array products excluding self and top-k
This question evaluates skills in array manipulation, in-place algorithm design, numerical stability and edge-case reasoning (such as handling multipl...
Compute currency conversion via graph search
Given a list of currency pairs, e.g., [('USD','CAD'), ('CAD','EUR'), ...], and a parallel list of conversion ratios [1.1, 1.2, ...] where ratio r mean...
Connect-N on an Infinite Board with Gravity
You are asked to implement a variant of the classic Connect Four game, played on an unbounded board. Game Rules - The board consists of vertical colum...
Implement sliding-window moving average
Design a class MovingAverage that supports a constructor MovingAverage(k) and a method next(val) returning the average of the last k values from a dat...