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.

316 Questions 72 Companies08.05.2026
Showing 20 results
Role
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Debug and optimize a card-drawing strategy

This question evaluates debugging and implementation skills, combinatorial search and optimization, and the ability to design and interpret simulation...

Coding & Algorithms
21
0
156 people solved
Feb 12, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Simulate Grid Infection

This question evaluates skills in multi-source breadth-first search, synchronous simulation updates, boundary handling, and off-by-one correctness wit...

Coding & Algorithms
20
0
135 people solved
Mar 9, 2026
Roblox logo
Roblox
Medium
Machine Learning Engineer Locked

Level-Ordered Dependency Build Order

This question evaluates a candidate's ability to model dependency relationships as a graph and produce a valid topological build order. It tests knowl...

Coding & Algorithms
0
0
7 people solved
Jun 21, 2026
Adobe logo
Adobe
Medium
Machine Learning Engineer Locked

Implement K-means clustering from scratch

This question evaluates a candidate's understanding of clustering algorithms and practical implementation skills in unsupervised machine learning, inc...

Coding & Algorithms
8
0
121 people solved
Jan 13, 2026
OpenAI logo
OpenAI
Hard
Machine Learning Engineer Locked

Simulate Infection Spread on a Grid

This question evaluates the ability to implement and reason about discrete-time, grid-based simulations with multi-state cells and neighbor-dependent ...

Coding & Algorithms
7
0
80 people solved
May 11, 2026
OpenAI logo
OpenAI
Hard
Machine Learning Engineer

Compute time to infect all cells

You are given an n × m grid representing people in a city. - Each cell is either infected (1) or healthy (0). - Two cells are neighbors if they share ...

Coding & Algorithms
108
1
980 people solved
Oct 24, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer Locked

Implement Top-p (Nucleus) Sampling in NumPy

This coding question tests practical implementation of top-p (nucleus) sampling, a core decoding strategy in large language models. It evaluates NumPy...

Coding & Algorithms
0
0
11 people solved
Jun 18, 2026
Google logo
Google
Medium
Machine Learning Engineer Locked

Implement substring search and weighted sampling

This question evaluates algorithm design and analysis skills across string processing (efficient substring search) and randomized/data-structure techn...

Coding & Algorithms
13
0
114 people solved
Mar 30, 2026
Goldman Sachs logo
Goldman Sachs
Hard
Machine Learning Engineer

Complete decision tree and gradient descent functions

You are given partially implemented code and must complete key functions. Implement the missing parts with correct logic and reasonable efficiency. Ta...

Coding & Algorithms
13
0
98 people solved
Oct 10, 2025
Applied logo
Applied
Hard
Machine Learning Engineer

Validate Nested Configuration Objects

You are given a set of custom descriptor objects that define the expected schema of a configuration object. Implement a validator that checks whether ...

Coding & Algorithms
2
0
41 people solved
Jan 12, 2026
Salesforce logo
Salesforce
Medium
Machine Learning EngineerSenior+

Build a concurrent site crawler

Implement a small crawler in Python for a single target website. Requirements: - Input: a start URL, a maximum crawl depth, and an output CSV path. - ...

Coding & Algorithms
9
0
91 people solved
Jan 12, 2026
LinkedIn logo
LinkedIn
Easy
Machine Learning Engineer Locked

Compute point-to-segment minimum distance

This question evaluates understanding of computational geometry and numerical robustness, testing the ability to compute Euclidean distances between a...

Coding & Algorithms
17
0
166 people solved
Feb 8, 2026
Anthropic logo
Anthropic
Medium
Machine Learning Engineer

Convert stack samples to execution trace

You are given sampling-profiler output: a list of Sample objects ordered by timestamp ascending. Each Sample has (t: float, stack: list[str]) where st...

Coding & Algorithms
53
0
856 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Track Expiring GPU Credits

This question evaluates event-replay and time-window accounting skills, including temporal data structures, priority-based consumption, out-of-order e...

Coding & Algorithms
16
0
142 people solved
Mar 9, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Simulate Turn-Based Monster Battles

This question evaluates the ability to implement a turn-based battle simulation with correct state management, turn semantics, knockout handling, dama...

Coding & Algorithms
14
0
116 people solved
Mar 9, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Solve five hard algorithm problems

This set of problems evaluates algorithm design and problem-solving skills across array manipulation, range-update techniques, load-balancing and part...

Coding & Algorithms
6
0
87 people solved
Mar 8, 2026
xAI logo
xAI
Hard
Machine Learning Engineer Locked

Implement Distributed Matrix Multiplication

This question evaluates distributed systems and parallel algorithm skills, specifically distributed matrix multiplication, data partitioning (row- and...

Coding & Algorithms
5
0
51 people solved
Jan 28, 2026
OpenAI logo
OpenAI
Hard
Machine Learning Engineer Locked

Streaming Entropy with Numerical Stability

This question tests a candidate's ability to implement numerically stable online algorithms for computing Shannon entropy over streaming data. It eval...

Coding & Algorithms
0
0
10 people solved
Jun 3, 2026
Meta logo
Meta
Hard
Machine Learning EngineerSenior+ AI Locked

Find Maximum Unique-Character Subset

This question evaluates algorithm design and combinatorial optimization skills, specifically the ability to model disjoint-character constraints, hand...

Coding & Algorithms
2
0
48 people solved
Mar 1, 2026
Meta logo
Meta
Hard
Machine Learning EngineerSenior+ AI Locked

Extend a Maze Solver

This question evaluates competence in graph search and state-space modeling, specifically BFS-based pathfinding, constrained traversal rules (directio...

Coding & Algorithms
4
0
36 people solved
Mar 1, 2026

Explore more Machine Learning Engineer Coding & Algorithms interview questions

Real questions from candidate reports, grouped by company, topic and role.

By company
Other categories for Machine Learning Engineer
Coding & Algorithms questions for other roles
Browse all