Question d’entretien chez AT&T

Weighted graph question, probably a Dijkstra-type problem.