Problem database last updated: June 20, 2025

PPinterest logo

Pinterest Coding Interview Questions

38 problems · 1 Easy, 22 Medium, 15 Hard · Ranked #56 of 458

Difficulty breakdown

1 Easy

3% · avg 23%

22 Medium

58% · avg 59%

15 Hard

39% · avg 18%

Top topics

array
68.4%
string
31.6%
sorting
28.9%2x
breadth-first-search
26.3%3.2x
hash-table
26.3%
matrix
18.4%2.1x

Interview profile

Based on 38 reported problems, Pinterest interviews are significantly harder than average - 39% Hard vs 18% across all companies. The majority (58%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, Pinterest puts unusual emphasis on union-find (10.5% of problems, 3.6x the industry average), backtracking (18.4% of problems, 3.5x the industry average), breadth-first-search (26.3% of problems, 3.2x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (68.4%), string (31.6%), sorting (28.9%), breadth-first-search (26.3%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 38 problems

Count and Say

Solve

The count-and-say sequence is a sequence of digit strings defined by the recursive formula:

MediumVery Likely
string

Reconstruct Itinerary

Solve

You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerar...

HardVery Likely
arraystringdepth-first-search

Shortest Path in a Grid with Obstacles Elimination

Solve

You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an empty cell...

HardVery Likely
arraybreadth-first-searchmatrix

Count Subarrays With Score Less Than K

Solve

The score of an array is defined as the product of its sum and its length.

HardVery Likely
arraybinary-searchsliding-window

Maximum Profit in Job Scheduling

Solve

We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i].

HardVery Likely
arraybinary-searchdynamic-programming

Bus Routes

Solve

You are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever.

HardVery Likely
arrayhash-tablebreadth-first-search

Expression Add Operators

Solve

Given a string num that contains only digits and an integer target, return all possibilities to insert the binary operators '+', '-', and/or '' between the digi...

HardVery Likely
mathstringbacktracking

Find Median from Data Stream

Solve

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two midd...

HardVery Likely
two-pointersdesignsorting

Is Subsequence

Solve

Given two strings s and t, return true if s is a subsequence of t, or false otherwise.

EasyLikely
two-pointersstringdynamic-programming

Reorganize String

Solve

Given a string s, rearrange the characters of s so that any two adjacent characters are not the same.

MediumLikely
hash-tablestringgreedy

Longest Word in Dictionary

Solve

Given an array of strings words representing an English Dictionary, return the longest word in words that can be built one character at a time by other words in...

MediumLikely
arrayhash-tablestring

Jump Game III

Solve

Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + arr[i] or i...

MediumLikely
arraydepth-first-searchbreadth-first-search

Coin Change

Solve

You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.

MediumLikely
arraydynamic-programmingbreadth-first-search

Find K-th Smallest Pair Distance

Solve

The distance of a pair of integers a and b is defined as the absolute difference between a and b.

HardLikely
arraytwo-pointersbinary-search

Meeting Rooms III

Solve

You are given an integer n. There are n rooms numbered from 0 to n - 1.

HardLikely
arrayhash-tablesorting

String Compression

Solve

Given an array of characters chars, compress it using the following algorithm:

MediumLikely
two-pointersstring

Target Sum

Solve

You are given an integer array nums and an integer target.

MediumLikely
arraydynamic-programmingbacktracking

Unique Paths II

Solve

You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-r...

MediumLikely
arraydynamic-programmingmatrix

Minimize Result by Adding Parentheses to Expression

Solve

You are given a 0-indexed string expression of the form "<num1>+<num2>" where <num1> and <num2> represent positive integers.

MediumLikely
stringenumeration

Is Graph Bipartite?

Solve

There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes...

MediumSometimes
depth-first-searchbreadth-first-searchunion-find

Unique Paths III

Solve

You are given an m x n integer array grid where grid[i][j] could be:

HardSometimes
arraybacktrackingbit-manipulation

The Number of Weak Characters in the Game

Solve

You are playing a game that contains multiple characters, and each of the characters has two main properties: attack and defense. You are given a 2D integer arr...

MediumSometimes
arraystackgreedy

Single Element in a Sorted Array

Solve

You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once.

MediumSometimes
arraybinary-search

Letter Combinations of a Phone Number

Solve

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

MediumSometimes
hash-tablestringbacktracking

Combination Sum

Solve

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...

MediumSometimes
arraybacktracking

Multiply Strings

Solve

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.

MediumSometimes
mathstringsimulation

Possible Bipartition

Solve

We want to split a group of n people (labeled from 1 to n) into two groups of any size. Each person may dislike some other people, and they should not go into t...

MediumSometimes
depth-first-searchbreadth-first-searchunion-find

Top K Frequent Elements

Solve

Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.

MediumSometimes
arrayhash-tabledivide-and-conquer

Split Array Largest Sum

Solve

Given an integer array nums and an integer k, split nums into k non-empty subarrays such that the largest sum of any subarray is minimized.

HardSometimes
arraybinary-searchdynamic-programming

Accounts Merge

Solve

Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are...

MediumSometimes
arrayhash-tablestring

Find Minimum Time to Finish All Jobs

Solve

You are given an integer array jobs, where jobs[i] is the amount of time it takes to complete the ith job.

HardSometimes
arraydynamic-programmingbacktracking

Smallest Range Covering Elements from K Lists

Solve

You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists.

HardSometimes
arrayhash-tablegreedy

Find First and Last Position of Element in Sorted Array

Solve

Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value.

MediumSometimes
arraybinary-search

Implement Trie (Prefix Tree)

Solve

A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various appl...

MediumSometimes
hash-tablestringdesign

Snakes and Ladders

Solve

You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in a Boustrophedon style starting from the bottom left of the board (i.e. b...

MediumSometimes
arraybreadth-first-searchmatrix

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumSometimes
arraydepth-first-searchbreadth-first-search

Shortest Path to Get All Keys

Solve

You are given an m x n grid grid where:

HardSometimes
arraybit-manipulationbreadth-first-search

Sudoku Solver

Solve

Write a program to solve a Sudoku puzzle by filling the empty cells.

HardSometimes
arrayhash-tablebacktracking

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Pinterest interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Pinterest coding interview

Pinterest interviews focus heavily on array, string, sorting problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Pinterest interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Pinterest ask in interviews?add

Pinterest has been reported to ask 38 distinct coding problems. The most common topics are array, string, sorting. 1 are Easy difficulty, 22 are Medium, and 15 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Pinterest coding interviews?add

Based on 38 reported problems, Pinterest interviews are significantly harder than average - 39% Hard vs 18% across all companies. 58% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Pinterest coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, sorting. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Pinterest interview?

Simulate a real Pinterest coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Pinterest interview with AIarrow_forward