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
Point72 logo
Point72
Medium
Machine Learning Engineer

Find the Smallest String After One Decrement

You are given a string s consisting only of lowercase English letters. You must perform exactly one operation: 1. Choose one non-empty contiguous subs...

Coding & Algorithms
2
0
23 people solved
Jan 21, 2026
Harvey logo
Harvey
Medium
Machine Learning Engineer Locked

Implement a Spreadsheet With Formulas

This question evaluates understanding of data structures and algorithms for dependency management, expression parsing and evaluation, and detection of...

Coding & Algorithms
3
0
26 people solved
Jun 1, 2026
Zillow logo
Zillow
Medium
Machine Learning Engineer

Write pseudocode for a ReAct-style loop

Coding prompt (pseudocode) Write pseudocode (does not need to compile) for a ReAct-style agent loop that alternates between reasoning and actions. Req...

Coding & Algorithms
5
0
67 people solved
Nov 8, 2025
Reddit logo
Reddit
Medium
Machine Learning Engineer Locked

Implement a simplified memcached server

This question evaluates a candidate's ability to implement a TCP-based in-memory key-value store, exercising skills in network I/O, protocol parsing, ...

Coding & Algorithms
1
0
11 people solved
May 31, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Simulate Plant Infection Spread

This question evaluates graph traversal and grid-based simulation skills, including modeling a 2D grid as a graph, propagation dynamics with obstacles...

Coding & Algorithms
6
0
75 people solved
Apr 3, 2026
Google logo
Google
Hard
Machine Learning Engineer Locked

Solve several streaming, DAG, and DP tasks

This multi-part question evaluates proficiency in streaming and online algorithms, DAG-based scheduling and parallelism reasoning, and constrained dyn...

Coding & Algorithms
13
1
150 people solved
Jan 6, 2026
Scale AI logo
Scale AI
Easy
Machine Learning Engineer Locked

Implement multi-head attention and LLM sampling

This question evaluates implementation and conceptual understanding of Transformer multi-head scaled dot-product attention and next-token sampling for...

Coding & Algorithms
46
0
316 people solved
Feb 12, 2026
Anthropic logo
Anthropic
Medium
Machine Learning Engineer Locked

Implement a web crawler using a provided API

This question evaluates understanding of web crawling mechanics, URL/hostname filtering, graph traversal concepts, and concurrent fetching, assessing ...

Coding & Algorithms
35
0
325 people solved
Feb 11, 2026
Luma logo
Luma
Medium
Machine Learning Engineer Locked

Solve Seven Python Image and Data Tasks

This multi-part Python assessment evaluates image and data processing competencies including array and matrix manipulation (center crop, rotation), nu...

Coding & Algorithms
0
0
9 people solved
May 25, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer

Maximize grid-path expression and count sawtooth subarrays

Problem 1: Maximize a valid expression along a grid path You are given an m x n grid grid. Each cell contains either: - an operator: '+' or '-', or - ...

Coding & Algorithms
16
0
122 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Machine Learning Engineer AI Locked

Build Friend Recommendations

This question evaluates proficiency with graph data structures, set operations, uniform random sampling, counting mutual connections, and deterministi...

Coding & Algorithms
5
0
46 people solved
Feb 8, 2026
Molocoads logo
Molocoads
Medium
Machine Learning EngineerIntern

Simulate bubble elimination and maximize common prefix

You are given two independent coding tasks (as in a multi-question OA). Solve each. Task A — Grid “bubble/candy” elimination simulation You are given ...

Coding & Algorithms
7
0
76 people solved
Dec 27, 2025
Microsoft logo
Microsoft
Medium
Machine Learning EngineerSenior+ Locked

Find Top K Largest Elements

This question evaluates a candidate's skill in algorithmic selection and data-structure usage for extracting top-k elements from large arrays, emphasi...

Coding & Algorithms
3
0
28 people solved
Feb 5, 2026
Figma logo
Figma
Medium
Machine Learning Engineer Locked

Implement Layer History and Grid Counting

This question evaluates a candidate's proficiency in mutable state management and reversible operations through implementing an undo/redo layer editor...

Coding & Algorithms
29
0
210 people solved
Mar 25, 2026
Meta logo
Meta
Hard
Machine Learning Engineer Locked

Simulate Monster Team Battles

This question evaluates a candidate's ability to model stateful simulations and implement deterministic battle mechanics with clean data structures an...

Coding & Algorithms
1
0
21 people solved
May 19, 2026
Tubitv logo
Tubitv
Medium
Machine Learning Engineer

Implement K-Means and compare with GMM

Implement K-Means clustering from scratch for a dataset X of shape (n_samples, n_features) and a target number of clusters k. Your implementation shou...

Coding & Algorithms
3
0
56 people solved
Jan 28, 2026
Disney logo
Disney
Medium
Machine Learning Engineer

Determine if chasing points will meet

You are given N points in 2D, indexed 0..N-1, forming a cycle. - At time t = 0, point i is at coordinates (xi, yi). - All points move simultaneously a...

Coding & Algorithms
8
0
83 people solved
Nov 1, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement PyTorch training loop

Implement a basic PyTorch training loop You are given a PyTorch neural network model, a DataLoader that yields (inputs, targets) batches, an optimizer...

Coding & Algorithms
9
0
93 people solved
Dec 8, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Differentiate virtual and pure virtual functions

Differentiate virtual and pure virtual functions In C++, what is the difference between a virtual function and a pure virtual function? Provide syntax...

Coding & Algorithms
5
0
42 people solved
Aug 8, 2025
Waymo logo
Waymo
Medium
Machine Learning Engineer

Debug Tensor Conversion Bugs

You are given a small tensor utility library used in distributed numerical code. The implementation has several bugs related to aliasing, array conver...

Coding & Algorithms
2
0
19 people solved
Nov 27, 2025

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