Pregunta de entrevista de Texas Instruments

Dijkstra algorithm with a slight modification