Amazon interview question

dijkstra algorithm based simple ques was asked.