← Questions

Depth-first traversal visiting smaller neighbors first

0
WaymoCodingLast asked Sep 2026

A coding interview question asked in Waymo's technical phone screen, last asked Sep 2026. It tests graphs, dfs and sorting.

You get a directed graph as adjacency lists, with vertices numbered 0 to n - 1, and a start vertex. The neighbors in each list are in no particular order.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Waymo · Technical phone screen · Last asked Sep 202645 min · Coding: a classic algorithm problem or an original, under-specified problem framed around self-driving

What it tests

graphs · dfs · sorting

Your code and the AI tutor open when you unlock this question.