Grid Search and Shortest Paths
Grid and graph search comes up at Waymo more than any other coding topic, which fits the work. A car plans routes over a road graph, and a lot of the code around it reads occupancy grids. The five problems below each come down to breadth-first search or Dijkstra.
One has come up in a phone screen and again in an onsite, and phone screens have asked two more. Once the edges carry drive times, you move from a plain queue to Dijkstra. The hardest of the set came from an ML onsite.
Settle two questions before you code. What counts as a node, and does every edge cost the same? Equal costs mean a plain queue, and drive times on the edges mean a heap. Say which one you chose and why. Then mark a cell as seen when it enters the queue, so no cell gets counted twice.
WaymoPremium lesson · Coding round
The 5 Waymo problems are below.
- A Premium questionCoding · Hard · Frequently asked
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Waymo questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Waymo interview guideKnow what Waymo asks before you walk in.
29 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.