Dijkstra implementation O(E + n log n). Where E = numEdges and n = numNodes