Ancestors

Toot

Written by eco_game@discuss.tchncs.de on 2024-12-16 at 18:16

[2024 Day 16] Had to scrap my Dijkstra and implement bfs instead :/

https://discuss.tchncs.de/post/26860423

=> View attached media

=> More informations about this toot | More toots from eco_game@discuss.tchncs.de

Descendants

Written by Sibbo on 2024-12-16 at 18:54

BFS is Dijkstra with a queue instead of a heap 🤷‍♂️

=> More informations about this toot | More toots from Sibbo@sopuli.xyz

Written by Gobbel2000@programming.dev on 2024-12-16 at 22:59

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.

=> More informations about this toot | More toots from Gobbel2000@programming.dev

Written by eco_game@discuss.tchncs.de on 2024-12-17 at 06:04

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.

=> More informations about this toot | More toots from eco_game@discuss.tchncs.de

Written by Deebster on 2024-12-17 at 04:22

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 🤓

=> More informations about this toot | More toots from Deebster@programming.dev

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113663868928656122
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
264.291538 milliseconds
Gemini-to-HTML Time
1.407822 milliseconds

This content has been proxied by September (3851b).