Graphs, Grids & BFS
Two of the Pinterest onsite reports that name a graph problem name a grid one: shortest path through a grid with a limited number of obstacles you may knock down, and the bus-routes BFS. Add the board-dependency ordering that shows up in product-flavored phrasing and you have the shape of this cluster. It leans on breadth-first search and topological sort more than on heavy DFS recursion. Drill accordingly.
None of this is Pinterest-specific algorithmically. It is the standard graph kit every FAANG loop draws from, occasionally reframed in Pin and board language. So own three templates cold: grid BFS for shortest paths, a multi-source BFS wavefront, and Kahn's topological sort. Let the product framing wash over them. When the prompt says "order the boards so each one is built after the boards it pulls from," your hands should already be reaching for indegree counts before the interviewer finishes the sentence.
(row, col, obstacles_remaining), and you have shown you see the trap.- 2 problems, worked step by step
- about 35 min
Premium lessonPinterest interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Pinterest interview guideKnow what Pinterest asks before you walk in.
14 coding · 5 system design · 16 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.