On the Wikipedia page for Dijkstra\'s algorithm, they mark visited nodes so they wouldn\'t be added to the queue again. However, if a node is visited then there can be no dista
Yes, you're right. There's no need for the visited vector.
If a node is visited then there cannot exist a distance to that node that is shorter, so, as you said, checking alt < dist[v] is enough.
alt < dist[v]
Take a look here: