Pinterest Intern Machine Learning Engineer Interview Experience — 70-Minute CodeSignal OA with Hand-Written Bagging and Naive Bayes

Pinterest·Machine Learning Engineer·Feb 2026
Online AssessmentInternhard

Based in Toronto. Looks like several teams were hiring at the same time, mostly on the search/ads/recommendations side.

HR reached out on LinkedIn, and after I submitted my resume and cover letter they sent me an OA. 70 minutes, 10 questions, done on CodeSignal — 6 multiple choice, 1 coding question, and 2 ML engineering questions.

The multiple choice questions were mostly ML fundamentals: the definitions of recall/precision, how to read a confusion matrix, some questions about gradients, and the tradeoffs of ensemble learning. The last multiple choice question was computing a neural network's forward pass by hand, which was pretty easy.

The coding question gave a string representation of a numeric value with one + sign in it, and asked me to add parentheses around the + sign (left and right) so that the final computed result is as small as possible, then return that result. The string doesn't contain any 0s. For example, "435+122" becomes "4(35+12)2" (I'm not saying this is necessarily the optimal placement, just an example of the format) — anything outside the parentheses is multiplication.

I'm pretty average at this stuff and hadn't done a problem like this before, so I just brute-forced a solution. It didn't time out, at least.

The last two questions both gave you a template and asked you to hand-write an ML model.

The first one was bagging with decision trees — you had to implement bootstrap(), fit(), and predict(), and you weren't allowed to use numpy.

The second one was basically writing Naive Bayes from scratch, including computing the prior and the posterior. numpy was allowed for that one.

This was my first time doing an MLE OA. I did a pretty rough job on it and don't expect to move forward, so I'm just chalking it up as experience gained.

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Pinterest
Role
Machine Learning Engineer
Level
Intern
Rounds
Online Assessment
Difficulty
hard
Interview date
Feb 2026
Questions from this interview
4 questions

Real Pinterest interview experiences

First-hand reports from Pinterest candidates — the rounds, the questions they were asked, and how it went.

All 20 Pinterest interview experiences