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

Find First Local Minimum

Given an integer array nums, find the index of the first local minimum. A local minimum is an element that is smaller than its immediate neighbors: - ...

Coding & Algorithms
3
0
20 people solved
Apr 17, 2026
Meta logo
Meta
Medium
Machine Learning Engineer AI

Find a String Containing Another

Given a list of strings, determine whether any string in the list contains another string from the same list as a contiguous substring. Return one str...

Coding & Algorithms
0
0
14 people solved
Apr 16, 2026
Applied logo
Applied
Medium
Machine Learning Engineer

Implement a Fixed-Capacity Deque

Design and implement a fixed-capacity double-ended queue. The data structure is initialized with an integer capacity k and must support the following ...

Coding & Algorithms
3
0
27 people solved
Apr 14, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer

Solve Four Coding Assessment Tasks

Complete the following four independent coding tasks. 1. Find the day a cumulative visit target is reached You are given an array visits, where visits...

Coding & Algorithms
4
0
34 people solved
Apr 13, 2026
Hudson logo
Hudson
Easy
Machine Learning Engineer

Count People Reaching the Boundary

You are given a 1-dimensional line segment with a right boundary at position L. There are N people with initial positions p1, p2, ..., pN, and there i...

Coding & Algorithms
3
0
26 people solved
Apr 11, 2026
Nextdoor logo
Nextdoor
Medium
Machine Learning EngineerNew Grad

Build Ranked Feed With Photo Batching

You are given a list of feed objects. Each object has: - id: a unique string - type: one of Normal, Video, or Photo - score: a numeric ranking score C...

Coding & Algorithms
1
0
15 people solved
Apr 5, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer

Design Hierarchical Permission Checks

You are given a hierarchy of groups represented as a tree, for example World -> Country -> City. Each advertiser can be granted access at any group no...

Coding & Algorithms
2
0
26 people solved
Apr 3, 2026
OpenAI logo
OpenAI
Hard
Machine Learning Engineer

Simulate Plant Infection With Controlled Burning

You are given an R by C grid of plants. Each plant is initially healthy, infected, recovered, or dead. A plant has up to four orthogonal neighbors. De...

Coding & Algorithms
2
0
9 people solved
Apr 2, 2026
Shopify logo
Shopify
Medium
Machine Learning Engineer AI

Implement URL Shortening Codec

Implement a small in-memory URL-shortening component in a pair-programming interview. Expose two methods: shorten(long_url: str) -> str, which returns...

Coding & Algorithms
0
0
3 people solved
Apr 1, 2026
Microsoft logo
Microsoft
Easy
Machine Learning Engineer Locked

Find Top K Largest Numbers

This question evaluates proficiency with heap/priority-queue data structures, selection algorithms, and the ability to analyze time and space complexi...

Coding & Algorithms
2
0
30 people solved
Apr 1, 2026
Apple logo
Apple
Medium
Machine Learning Engineer

Wrap Matching Substrings in Bold Tags

During a machine learning engineer phone screen, the coding task was: You are given a string text and a list of strings patterns. Return a new string ...

Coding & Algorithms
6
0
54 people solved
Mar 16, 2026
Generalmotors logo
Generalmotors
Hard
Machine Learning Engineer Locked

Count Islands in a Grid

This question evaluates skills in graph traversal and grid connectivity detection, testing competency in reasoning about adjacency, state management, ...

Coding & Algorithms
1
0
23 people solved
Mar 14, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Design an Editable Text Buffer

This question evaluates data structure design, mutable state management, undo/redo semantics, and prefix-based autocomplete indexing with dynamic freq...

Coding & Algorithms
22
0
168 people solved
Mar 11, 2026
Shopify logo
Shopify
Medium
Machine Learning Engineer AI Locked

Simulate a rover fleet

This question evaluates skills in simulation design, state management, grid-based movement logic, and handling constraints such as obstacles, boundari...

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

Optimize a Fifteen-Sum Card Strategy

This question evaluates algorithmic problem-solving, debugging, simulation-based testing, and strategy optimization using techniques such as search, m...

Coding & Algorithms
6
0
58 people solved
Mar 1, 2026
Uber logo
Uber
Medium
Machine Learning Engineer

Solve DFS grid and keypad problems

You may be asked to solve one or more DFS/backtracking problems: 1. Grid connectivity problem: Given an m x n grid where 1 represents land and 0 repre...

Coding & Algorithms
17
1
138 people solved
Mar 1, 2026
Nextdoor logo
Nextdoor
Medium
Machine Learning Engineer

Merge overlapping weekly time intervals

You are given a list of time intervals representing meetings. Each interval is a pair of strings in the format: - "<Day> <H>:<MM>" (24-hour time) - <D...

Coding & Algorithms
12
0
96 people solved
Mar 1, 2026
Atlassian logo
Atlassian
Hard
Machine Learning Engineer Locked

Compute a moving average on a stream

This question evaluates understanding of streaming data structures, sliding-window aggregation, and the time/space trade-offs involved in maintaining ...

Coding & Algorithms
4
0
38 people solved
Mar 1, 2026
Samsung logo
Samsung
Medium
Machine Learning Engineer

Maximize sum of non-adjacent values

Problem You are given an integer array nums representing the amount of money available at each house along a street. If you take money from house i, y...

Coding & Algorithms
4
0
41 people solved
Mar 1, 2026
Microsoft logo
Microsoft
Medium
Machine Learning Engineer Locked

Implement cache and merge intervals

This question evaluates proficiency in designing and implementing efficient data structures (a fixed-capacity LRU key-value cache) and interval-proces...

Coding & Algorithms
3
0
33 people solved
Feb 23, 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