ossner / TUMGAD

Exercise generator and helpful materials for the Introduction to Algorithms and Data Structures 📚
https://ossner.github.io/TUMGAD/src/routes
MIT License
43 stars 4 forks source link

Dijkstra's Algorithm rogue node in final path #1

Open ossner opened 4 years ago

ossner commented 4 years ago

Describe the bug In the solution path for Dijkstra's algorithm, it can happen that there appears a node that should not appear in the shortest path.

To Reproduce Steps to reproduce the behavior (If generation issue, please provide the seed stated on the first page):

  1. Random seed: 410964038
  2. Go to Dijkstra Solution

Screenshots image

image

Desktop:

Additional context Note that the final path length was not influenced by the K node, so if you encounter this, you could just think about whether or not it makes sense.