Pinterest Interview Questions
Practice the exact questions companies are asking right now.
Compute reachable cells for a cleaning robot
You are given a 2D grid representing a floor plan: - 0 = free cell (the robot may stand on it) - 1 = blocked cell (obstacle) The robot can move from a...
Design a real-time home feed ranker
Scenario Design a real-time home feed (e.g., social or content platform) that is responsive to user engagement. Users open the app and see a ranked li...
Design an ads event reporting system
Design an ads event reporting system that collects user-ad interaction events and serves aggregated metrics. Requirements 1. Ingest events from multip...
Generate all hyperparameter combinations
You are given several groups of hyperparameter choices for an ML experiment. Each group contains one hyperparameter name and a list of candidate value...
Design an unsafe content detection system
Scenario You are building a system that detects and mitigates unsafe user-generated content (UGC) on a large platform. Unsafe content can include: hat...
Implement sparse matrix storage, addition, and multiplication
Design a way to store a sparse matrix (most entries are zero) and implement efficient operations. You are given matrices using their non-zero entries:...
Reconstruct route from unordered travel tickets
You are given a list of directed travel tickets, each represented as a pair [from, to] (city names are strings), e.g. [["A","B"],["B","C"], ...]. The ...
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...
Explain bias–variance, overfitting, and vanishing gradients
Answer the following ML fundamentals questions: 1. Bias–variance tradeoff: What are bias and variance? How do they relate to underfitting/overfitting?...
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...
Write SQL for top categories and highly active users
You are given three tables: 1) impression Event-level table of user impressions. - impression_id BIGINT (PK) - user_id BIGINT (FK → user.user_id) - pi...
Implement trie-based autocomplete
Problem Design an autocomplete data structure using a trie. You must support: 1. insert(word: string) -> void 2. search(word: string) -> bool (exact m...
Design an ads system to improve CTR
Design an ML system to increase the click-through rate (CTR) of ads shown in the feed of an online social media platform. Address the following: 1. Go...
Support room moves and query top-k fastest
Problem There are R rooms labeled 0..R-1 (in increasing order), and P people labeled 0..P-1. - Initially, all people are in room 0. - Operation move(p...
Solve set equality and ad log top‑K
Problem Set (Coding) 1) Check whether two sets are equal You are given two integer arrays A and B that represent sets, except they may contain duplica...
Design and assess video-pin increase experiment
You plan to increase the proportion of video pins surfaced in the home feed. Design a rigorous evaluation and then interpret provided results. A) Expe...
Explain overfitting and how to prevent it
You are asked rapid-fire ML fundamentals questions. 1. What is overfitting? Explain it in terms of training vs. validation performance and generalizat...
Design and interpret video-pins experiment results
A/B Test: Increasing Video Pins in Home Feed by +10 pp Context: You ran a 14-day A/B test that increases the share of video pins in Home Feed by +10 p...
Compute percent of first-cancel users who never return
You’re analyzing appointment behavior for a scheduling product. Table appointments - appointment_id (STRING, PK) - user_id (STRING) - scheduled_start_...
Explain BLS vs CLS; compute t-stats
Part A — Concepts: Define Brand Lift Study (BLS) vs Conversion Lift Study (CLS) in ads measurement. List key bias/variance sources for each (e.g., non...