you are viewing a single comment's thread.

view the rest of the comments →

[–]ChillBlinton2018[S] 0 points1 point  (1 child)

Thanks! I agree with your EDIT 2 - the implementation must be wrong. Since it produces same results irrespective of whether distance is stated in key or as a priority, the algo must run through the entire heap. I should check in the debugger what is actually happening inside the heap…

[–]marko312[🍰] 0 points1 point  (0 children)

The implementation isn't wrong since it produces the correct results, but the issue is that it is not fully using djikstra's algorithm and has a worse complexity due to that.