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
Pinterest logo
Pinterest
Medium
Machine Learning EngineerSenior+ Locked

Solve Expression and Tree-List Problems

This question evaluates competency in string expression generation under a custom left-to-right evaluation rule and in-place binary search tree manipu...

Coding & Algorithms
15
0
108 people solved
Feb 21, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Sample index from weighted probability distribution

Given an array weights[0..M-1] representing a discrete distribution over M outcomes, implement a function sampleIndex(weights) that returns an index i...

Coding & Algorithms
4
0
77 people solved
Feb 18, 2026
Apple logo
Apple
Medium
Machine Learning Engineer

Implement Kubernetes Service Dependency Queries

You are given an in-memory inventory of Kubernetes-like services. Each service has the following fields: `text Service { id: string // ...

Coding & Algorithms
0
0
4 people solved
Feb 13, 2026
Snapchat logo
Snapchat
Medium
Machine Learning Engineer Locked

Find all quadruplets summing to target

This question evaluates competency in array algorithms, combinatorial search, and handling duplicates with index-uniqueness constraints, and falls und...

Coding & Algorithms
3
0
30 people solved
Feb 12, 2026
TikTok logo
TikTok
Medium
Machine Learning EngineerNew Grad

Implement stack variants and path-sum check

Coding tasks Solve the following algorithmic problems. 1) MinStack Design a stack supporting: - push(x), pop(), top() - getMin() returning the minimum...

Coding & Algorithms
11
0
78 people solved
Feb 12, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Maximize unique characters from a word list

This question evaluates algorithmic problem-solving skills focused on combinatorial subset selection and character-uniqueness constraints in strings, ...

Coding & Algorithms
11
0
84 people solved
Feb 12, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Maximize concatenation length with unique chars

This question evaluates understanding of string manipulation, set-based uniqueness constraints, and combinatorial subset selection for maximizing conc...

Coding & Algorithms
3
0
47 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Medium
Machine Learning Engineer Locked

Implement a resumable data loader

This question evaluates a candidate's ability to design stateful, resumable data iteration with deterministic shuffling and compact serializable check...

Coding & Algorithms
5
0
56 people solved
Feb 11, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer Locked

Sample index from probability distribution

This question evaluates proficiency in randomized algorithms and probability-based sampling, along with algorithmic preprocessing and data-structure d...

Coding & Algorithms
31
0
217 people solved
Feb 11, 2026
Google logo
Google
Medium
Machine Learning Engineer Locked

Minimize Fence Painting Operations

This question evaluates algorithmic problem-solving and optimization skills, focusing on minimizing painting operations on an array-modeled fence and ...

Coding & Algorithms
3
1
54 people solved
Feb 10, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Insert parentheses to minimize expression value

You are given a string expression of the form A+B, where A and B are non-empty strings of digits (no digit is '0'). You must insert exactly one pair o...

Coding & Algorithms
6
1
115 people solved
Feb 9, 2026
Google logo
Google
Medium
Machine Learning Engineer Locked

Compute sum over consecutive-step subarrays

This question evaluates proficiency in array processing, detection of consecutive-step arithmetic sequences, and accumulation of subarray sums with at...

Coding & Algorithms
10
1
84 people solved
Feb 8, 2026
Roblox logo
Roblox
Easy
Machine Learning Engineer

Find the Most Frequent Log Call

You are given a sequence of application log entries. Each entry contains the name of a function or API call made by the system. Write a function that ...

Coding & Algorithms
16
0
126 people solved
Feb 1, 2026
Snapchat logo
Snapchat
Hard
Machine Learning Engineer

Implement calculator and graph connectivity

Answer the following coding problems: 1. Implement an arithmetic expression evaluator. Given a string containing non-negative integers, spaces, +, -, ...

Coding & Algorithms
6
0
53 people solved
Jan 30, 2026
Meta logo
Meta
Hard
Machine Learning Engineer

Solve Three Algorithmic Problems

Three coding questions were mentioned: 1. Second-largest distinct permutation Given an array of integers that may contain duplicates, consider all ...

Coding & Algorithms
5
0
40 people solved
Jan 30, 2026
TikTok logo
TikTok
Medium
Machine Learning Engineer Locked

Find length of longest common subsequence

This question evaluates understanding of dynamic programming, string algorithms, and algorithmic problem-solving skills related to sequence comparison...

Coding & Algorithms
5
0
45 people solved
Jan 22, 2026
Meta logo
Meta
Medium
Machine Learning EngineerSenior+ Locked

Find two numbers summing to target without hashmap

This question evaluates array manipulation, index-tracking, and algorithmic problem-solving skills, with emphasis on time and space complexity trade-o...

Coding & Algorithms
4
0
73 people solved
Jan 22, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Generate all hyperparameter combinations

This question evaluates competence in combinatorial enumeration and manipulation of data structures for generating hyperparameter configurations, test...

Coding & Algorithms
12
0
117 people solved
Jan 22, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer Locked

Count ordered fragment pairs forming a password

This question evaluates proficiency with string manipulation, handling duplicate fragments, and combinatorial reasoning about ordered index pairs that...

Coding & Algorithms
10
0
69 people solved
Jan 20, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer Locked

Simulate round-robin package assignment to servers

This question evaluates array-based simulation and control-flow skills for load distribution, including pointer management, modular wrap-around scanni...

Coding & Algorithms
7
0
58 people solved
Jan 20, 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