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 16 results
Role
Anthropic logo
Anthropic
Medium
Machine Learning Engineer

Implement an extensible prefix tree

Implement a prefix tree (trie) supporting insert(word), search(word), startsWith(prefix), countPrefix(prefix), and erase(word). Optimize for time and ...

Coding & Algorithms
44
0
317 people solved
Aug 14, 2025
Snapchat logo
Snapchat
Medium
Machine Learning Engineer

Find nearest room; extend to two users

You are given an m×n grid where 1 is a wall (impassable), 0 is an empty cell, and 2 is a meeting room. From a starting coordinate [r, c], you may move...

Coding & Algorithms
2
0
44 people solved
Aug 13, 2025
Rippling logo
Rippling
Medium
Machine Learning Engineer

Implement stack and interval algorithms with tests

Implement three coding tasks and design your own unit tests for each. 1) Validate Bracket String with a Stack - Input: a string s containing only '(',...

Coding & Algorithms
10
0
75 people solved
Aug 12, 2025
Meta logo
Meta
Medium
Machine Learning EngineerSenior+

Solve matrix components, median, and traversals

1) Binary matrix component: Given an m x n grid of 0s (background) and 1s (objects), return the size of the largest connected component where connecti...

Coding & Algorithms
4
0
51 people solved
Aug 11, 2025
Adobe logo
Adobe
Medium
Machine Learning Engineer

Determine if a multiple-sum subarray exists

Determine if a multiple-sum subarray exists Given an integer array nums and an integer k, determine whether there exists a contiguous subarray of leng...

Coding & Algorithms
14
0
108 people solved
Aug 9, 2025
Jump Trading logo
Jump Trading
Medium
Machine Learning Engineer

Solve stock trading with pattern rules

Question Given an array of daily stock prices and two pattern arrays: sellPattern and buyPattern, each consisting of 1 (price up) and -1 (price down) ...

Coding & Algorithms
7
0
69 people solved
Aug 4, 2025
Jump Trading logo
Jump Trading
Medium
Machine Learning Engineer

Solve stock-pattern trading and substring elimination

Part A — Stock trading by pattern signals: - Input: an integer array prices (length n) of daily stock prices; an array buyPattern and an array sellPat...

Coding & Algorithms
5
0
100 people solved
Aug 1, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Check diagonal equality in a matrix

Given an m x n integer matrix, determine whether every top-left to bottom-right diagonal contains identical values (all elements along each such diago...

Coding & Algorithms
6
0
62 people solved
Jul 31, 2025
Nextdoor logo
Nextdoor
Medium
Machine Learning Engineer

Implement and use a version comparator

Implement and use a version comparator You are given up to 100,000 version-like identifiers (e.g., "1.0", "01.2.0", "2.0.0-alpha", "1.10.3"). Implemen...

Coding & Algorithms
7
0
77 people solved
Jul 27, 2025
Anthropic logo
Anthropic
Medium
Machine Learning Engineer

Implement cluster status tracker

Implement a cluster status tracker. Design a class with methods: update(nodeId, status, timestamp) to record node status updates that may arrive out o...

Coding & Algorithms
19
0
259 people solved
Jul 27, 2025
Zillow logo
Zillow
Medium
Machine Learning Engineer

Implement placeholder-based pattern matcher

Implement placeholder-based pattern matcher You are given: 1. A string s that may contain placeholders delimited by the % character. 2. A dictionary d...

Coding & Algorithms
1
0
32 people solved
Jul 18, 2025
Zillow logo
Zillow
Medium
Machine Learning Engineer

Find max min-plus-max over all subarrays

Find max min-plus-max over all subarrays You are given an array arr of n integers. A subarray is a contiguous non-empty segment of the array. For any ...

Coding & Algorithms
5
0
37 people solved
Jul 18, 2025
xAI logo
xAI
Medium
Machine Learning EngineerIntern

Validate normalized palindromes with variants

Implement a function isNormalizedPalindrome(s) that returns true if s reads the same forward and backward after removing non‑alphanumeric characters a...

Coding & Algorithms
14
1
109 people solved
Jul 17, 2025
Snapchat logo
Snapchat
Medium
Machine Learning Engineer

Find Shortest Clear Grid Path

Given an n x n binary grid, where 0 means open and 1 means blocked, return the length of the shortest clear path from the top-left cell to the bottom-...

Coding & Algorithms
3
0
34 people solved
Jun 28, 2025
xAI logo
xAI
Hard
Machine Learning Engineer

Greedy Longest-Match Tokenizer for an LLM Data Pipeline

You are building a text pre-processing step for a large-language-model training pipeline. Before raw text can be fed into the model, it must be split ...

Coding & Algorithms
0
0
3 people solved
May 30, 2025
OpenAI logo
OpenAI
Hard
Machine Learning Engineer

Implement in-memory database insert and delete operations

Design and implement a simple in-memory database (key-value store) that supports the following operations: - insert(key, value): Insert a key-value pa...

Coding & Algorithms
12
0
170 people solved
Apr 6, 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