+ 1
This explains the algorithm so you could write it.
https://medium.com/basecs/finding-the-shortest-path-with-a-little-help-from-dijkstra-613149fbdc8e
This gives source that you should not steal.
https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/