InterviewLegend

Grid Search and Shortest Paths

Alex Chen60 min readUpdated 38 real interview reports

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.

  1. A Premium questionCoding · Hard · Frequently asked
  2. A Premium questionCoding · Medium
  3. 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.

Had your Waymo interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Waymo interview guide

Know what Waymo asks before you walk in.

29 coding · 3 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.