AO
AceOffer
·
Back

ETA / Shortest Path Calculation on Map

Phone ScreenPhone ScreenSoftware Engineer, Machine Learning EngineerLast reported May 2026Low Frequency

Problem Overview

Given a map represented as a graph of nodes (semantic map nodes) with weighted edges representing distances or travel times between nodes, calculate the shortest path (and/or estimated time of arrival, ETA) between a given start node and one or more target nodes.
Full problem statement
Given a map represented as a graph of nodes (semantic map nodes) with weighted edges representing distances or travel times between nodes, calculate the shortest path (and/or estimated time of arrival, ETA) between a given start node and one or more target nodes. The problem is intentionally left somewhat vague — candidates are expected to clarify requirements (e.g., directed vs. undirected graph, edge weight semantics, single vs. multiple targets) before implementing. Similar to LeetCode 743 (Network Delay Time).

Follow-up Arc

Interviewers escalate through these phases. The order varies, but most candidates see at least one from each bucket.
Trade-off discussion · 3
Trade-off discussion
What clarifying questions would you ask before coding? (e.g., directed or undirected? negative weights possible? single or multiple targets?)
Probes for: After candidate states the problem
What is the time and space complexity of your solution?
Probes for: After Dijkstra solution is presented
How would you modify your approach if there are multiple target nodes and you need the shortest path to all of them?
Probes for: Multiple target nodes variant

Approach Trade-offs

Approaches actually attempted in reports — including ones that lost candidates time. Pick deliberately.
ApproachNotes
Bellman-FordHandles negative edge weights but runs in O(VE), much slower than Dijkstra for typical non-negative map edge weights.
A* SearchUses a heuristic (e.g., Euclidean distance) to guide search toward a single target faster than Dijkstra, but more complex to implement and heuristic must be admissible.
BFS (unweighted graph)Optimal and simpler if all edges have equal weight, but inapplicable when edges have varying distances/times.

Practice

Open the editor to write a solution against test cases, then return here to compare against the follow-ups.
Open Editor →
Waymo · Phone Screen · Reported 2× across candidate reports