Uber interview question

Solve a leetcode medium that used Dijkstra's.