Implementing Dijkstra's algorithm using a minimum priority queue (made with a binary heap) and a graph