Pinterest Machine Learning Engineer Coding & Algorithms Interview Questions

Practice 15 real Coding & Algorithms interview questions for Machine Learning Engineer roles at Pinterest.

15 Questions 1 Company07.03.2026
Showing 15 results
Role
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Implement a Stateful Search Autocomplete Session

Implement a Stateful Search Autocomplete Session Build an autocomplete engine from historical sentences and their usage counts. While a user types a s...

Coding & Algorithms
2
0
34 people solved
Jul 3, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

First Word Matching Each Prefix Query

This question evaluates a candidate's grasp of string data structures and efficient prefix-matching techniques, core competencies in coding and algori...

Coding & Algorithms
1
0
13 people solved
Jun 3, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Solve a 9x9 Sudoku puzzle

Given a partially filled 9×9 Sudoku board, fill the empty cells so that the completed board is valid. A valid Sudoku satisfies: - Each row contains di...

Coding & Algorithms
18
1
139 people solved
Dec 13, 2025
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
Pinterest logo
Pinterest
Hard
Machine Learning Engineer Locked

Sample a string by real-valued scores

This question evaluates probabilistic sampling, numerical stability, and algorithmic implementation skills for weighted selection under floating-point...

Coding & Algorithms
12
0
138 people solved
Mar 1, 2026
Pinterest logo
Pinterest
Hard
Machine Learning EngineerSenior+ Locked

Support room moves and query top-k fastest

This question evaluates understanding of dynamic data structure design and ordering semantics, specifically maintaining per-room FIFO arrival order, c...

Coding & Algorithms
9
0
68 people solved
Jan 12, 2026
Pinterest logo
Pinterest
Hard
Machine Learning EngineerSenior+ Locked

Implement trie-based autocomplete

This question evaluates understanding and implementation of trie data structures for prefix-based retrieval, testing competencies in string algorithms...

Coding & Algorithms
5
0
47 people solved
Jan 12, 2026
Pinterest logo
Pinterest
Easy
Machine Learning Engineer

Implement string-based rounding without floats

Coding You are not allowed to parse the input into a built-in floating type (to avoid overflow and precision issues). Work directly on strings. 1) Imp...

Coding & Algorithms
12
0
109 people solved
Dec 15, 2025
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Solve prefix, array, and string problems

This set of problems evaluates proficiency in string and array algorithm design—covering prefix search, subsequence matching, and maximal-area computa...

Coding & Algorithms
2
0
18 people solved
Apr 9, 2025
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Hierarchical Access Control for an Advertising Platform

This question tests practical application of graph traversal and access control system design using a directed acyclic group hierarchy. It evaluates a...

Coding & Algorithms
1
0
27 people solved
Jun 3, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Implement a Sparse Matrix Class

This question evaluates the ability to design and implement efficient sparse data structures and perform matrix operations, testing knowledge of spars...

Coding & Algorithms
1
0
15 people solved
May 11, 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
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
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
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

Explore more Pinterest Machine Learning Engineer interview questions

Real questions from candidate reports, grouped by topic.

Browse all