Pinterest Software Engineer Interview Questions
Master your tech interview with our curated database of real questions from top companies.
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...
Implement a min-heap column allocator
You are given an integer k (number of columns) and an array posts of positive integers where posts[i] is the height of the i-th post. All columns star...
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...
Implement stream line reader and settle balances
Part 1: Streaming line reader from chunked source You are given an existing class ChunkSource with a method nextChunk() that returns the next piece of...
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...
Determine equality of arbitrarily nested sets
Implement a function that determines whether two arbitrarily nested sets are equal. Sets are unordered and contain no duplicates; elements can be inte...
Design adjustable ID allocator
You manage an integer ID space [0, 999] and N named buckets in a fixed order. Implement two operations: ( 1) allocate(buckets: List<(name, desired_siz...
Implement string-based integer multiplication
Given two non-negative integers represented as decimal strings, return their product as a decimal string without using built-in big-integer or arbitra...
Compute minimal transactions to settle debts
You are given a list of transactions (payer, payee, amount) among a set of people. Compute a sequence of transfers that settles all net balances using...
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...
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...
Decide target via subsequence plus/multiply expression
Given a sequence of positive 32-bit integers A and an integer target, determine whether there exists a subsequence of A (preserving order, using each ...
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...
Implement string-based big integer multiplication
Implement multiplyStrings(a, b) to multiply two non-negative integers given as decimal strings and return the product as a string without converting t...
Settle debts with minimal transactions
You are given a list of debts as triples (debtor, creditor, amount), where each amount > 0. Return a set of settlement transfers (from, to, amount) th...
Design a high-throughput distributed rate limiter
System Design: High-Throughput Distributed Rate Limiting Service Context You are designing a multi-tenant rate limiting platform for an edge/gateway l...
Implement tap-to-infect color grid on iOS
iOS Grid Infection (Flood Fill) Design Goal Build an iOS app that displays a 2D grid with two colors. When the user taps a cell, all 4-directionally a...
Build an emoji blaster animation on iOS
iOS "Blaster" App: Press-and-Hold Emoji Projectiles Problem Build a minimal iOS app with a button fixed at the bottom. While the user presses and hold...
Design a Google Photos–like service
System Design: Google Photos–like Service (Web + Mobile) Context Design a large-scale consumer media service that ingests, stores, indexes, and serves...
Cross-reference logs to flag spam numbers
You are given two data sets: ( 1) a call log containing phone numbers observed in calls and ( 2) a list of user reports where each entry is a phone nu...