Akuna Capital·Data Scientist·Technical Phone Screen
- Given an unweighted undirected city road network modeled as a graph, with a depot node and a set of delivery requests each having a priority and unique ID, design an algorithm to produce a service order sorted by shortest-hop distance from the depot, breaking ties by higher priority first and then by smaller ID. The solution should run in O(V+E + D log D). Explain correctness, handle unreachable nodes, and write pseudocode.
“This one took me a second to parse because there's a lot of text dressing up what is basically BFS plus a sort.”