Skip to content

Conversation

@clumsy
Copy link
Contributor

@clumsy clumsy commented Oct 24, 2024

Adding python implementation, fixing a minor grammatical error.

Recreating #1336 against the new base (main).

@adamant-pwn
Copy link
Member

I think it's best to also rewrite C++ code with a newer standard to match the Python style.

But could you please test both implementations on one of the example problems in the article?

@mhayter
Copy link
Contributor

mhayter commented Apr 11, 2025

Updates?

mhayter and others added 2 commits August 25, 2025 18:33
Co-authored-by: Oleksandr Kulkov <[email protected]>
Co-authored-by: Oleksandr Kulkov <[email protected]>
@mhayter
Copy link
Contributor

mhayter commented Aug 26, 2025

Updates looked valid. Having parallel implementations is ideal.

@clumsy
Copy link
Contributor Author

clumsy commented Aug 28, 2025

Do we need to squash the commits into one? @adamant-pwn @mhayter

from heapq import heappop, heappush


d = [float("inf")] * n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add n = len(adj) to be consistient with the C++ version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'll look into it

@spike1236
Copy link
Member

Would be nice to add tests too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants