Consider the following weighted directed graph:
Let's consider node 1 as a starting node, according to the Dijkstra algorithm we have the following steps:
node 1 marked visited.
the shortest path to node 2 has weight 1. Mark node 2 visited.
the shortest path to node 3 has weight 30. Mark node 3 visited. After that, according to algorithm node 3 has minimal path weight as 30, and cannot be changed. But, evidently, the shortest path to node3 is 4.
Can you, please point out any flaw in my interpretation of the algorithm?