Pinterest Interview Questions
Practice the exact questions companies are asking right now.
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...
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...
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_...
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...
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...
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...
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 autocomplete and merchant bulk edits
System Design Prompts 1) Design search engine input suggestions (autocomplete) Design a system that provides real-time query suggestions as a user typ...
Design highly available blob storage service
Design a large-scale, highly available blob storage service similar to Amazon S3. The service should allow clients to store, retrieve, and delete arbi...
Design a global high-throughput rate limiter
System Design: Global, High-Throughput Rate Limiter Context You are designing a global, multi-region rate-limiting service that enforces quotas: - Per...
Explain learning-rate fluctuation and vanishing gradients
ML Fundamentals Answer the following conceptual questions: 1. Learning rate vs. training stability: Why can training metrics (loss/accuracy) fluctuate...
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...
Demonstrate leadership with concrete STAR examples
Behavioral & Leadership (Onsite) — STAR Examples With Metrics Provide succinct STAR-format examples (Situation, Task, Action, Result), with specific m...
Round numeric string values
Question Given a numeric string, implement rounding to the nearest integer (e.g., '3.5' → '4', '100.01' → '100'). Follow-up: round to the last signifi...
Design ID allocator with resizable bucket ranges
Given a fixed global ID space [0, 999] and an initial list of bucket specifications, where each bucket has a unique name and an inclusive ID range [st...
Demonstrate culture fit with examples
Behavioral & Leadership Interview (Software Engineer Onsite) You are preparing for an onsite behavioral and leadership interview for a Software Engine...
Reconstruct itinerary with lexicographic ties
You are given m airline tickets as directed pairs [from, to]. Build an itinerary that starts at a specified airport start (e.g., "JFK") and uses every...
Design a violation log analyzer
You are given an append-only list of violation events as tuples (id: string, policy: string, date: ISO-8601 string). Build an in-memory "Violation Log...