Question d’entretien chez Amazon

dijkstra algorithm based simple ques was asked.