• Deebster@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    14 days ago

    The main thing I remember about Dijkstra’s algorithm was that at uni when we coded it up in the lab my version had a bug where a certain node was always 0, so I just left the mouse cursor on top of that mode when I demoed it - got full marks 🤓

  • Gobbel2000@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    14 days ago

    Dijkstra’s algorithm can fairly simply be modified to work for part 2. In the relaxation step you just need to also handle the case that the distances of two joining paths are equal.

    • eco_gameOP
      link
      fedilink
      arrow-up
      2
      ·
      14 days ago

      I did try that at first, but it didn’t really work the way I wanted it to. That’s probably also because our implementation from school was a bit odd.