← Waymo Interview Insights

Waymo·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Waymo SWE interview with a graph/routing problem that felt pretty squarely aimed at the self-driving domain. One main coding question with a few follow-ups that escalated quickly.

Questions Asked (1)

Q1

Given a weighted undirected graph representing a map, find the shortest travel time between two nodes s and t.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

Jumped straight to Dijkstra which was the right call, and remembered to add early termination once t gets dequeued.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints (graph size, edge weight properties, memory limits) and then propose Dijkstra's algorithm with a binary heap as the standard solution. Discuss the trade-offs versus alternatives like A* or Bellman-Ford, and mention how you would handle large-scale graphs in a production system like Waymo's.

Pro tip: Mention that for road networks, A* with a consistent heuristic (e.g., Euclidean distance) often outperforms Dijkstra in practice, and that bidirectional search can further reduce the explored search space. Also, note that edge weights must be non-negative for Dijkstra; if negative weights are possible, you'd need Bellman-Ford.

1. Clarify requirements and constraints

Ask about graph size, whether edge weights are non-negative, if the graph is static or dynamic, and any memory/time constraints. This shows you think about real-world applicability.

2. Choose the right algorithm

For non-negative weights, Dijkstra with a priority queue is optimal for single-source shortest path. For large road networks, consider A* with a heuristic or bidirectional Dijkstra. If negative weights exist, use Bellman-Ford.

3. Outline the algorithm and data structures

Describe using a min-heap to extract the node with the smallest tentative distance, and an array or hash map to track distances. Explain relaxation of edges and early termination when t is extracted.

4. Analyze complexity and trade-offs

State time complexity O((V+E) log V) with a binary heap, and space O(V). Compare with alternatives like A* (faster with good heuristic) or Bellman-Ford (O(VE), handles negative weights).

5. Discuss scalability and production considerations

For Waymo-scale maps, mention preprocessing techniques like contraction hierarchies or using A* with landmark heuristics. Also consider real-time traffic updates and distributed graph processing.

Key Points to Mention

  • Dijkstra's algorithm with a priority queue (binary heap) for non-negative weights
  • Time and space complexity: O((V+E) log V) time, O(V) space
  • A* search with a consistent heuristic (e.g., Euclidean distance) for faster queries on road networks
  • Bidirectional search to reduce the search space
  • Handling negative weights with Bellman-Ford (if applicable)
  • Real-world scalability: preprocessing (contraction hierarchies), dynamic edge weights, and distributed systems

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.