Samsung Electronics Interview Question

Q: Dijkstra to find the shortest path