Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: python impl for 0-1 BFS#1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
clumsy wants to merge4 commits intocp-algorithms:main
base:main
Choose a base branch
Loading
fromclumsy:fix/0_1_bfs

Conversation

clumsy
Copy link
Contributor

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?

clumsy and mhayter reacted with thumbs up emoji

@mhayter
Copy link
Contributor

Updates?

mhayterand others added2 commitsAugust 25, 2025 18:33
Co-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
Co-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
@mhayter
Copy link
Contributor

Updates looked valid. Having parallel implementations is ideal.

@clumsy
Copy link
ContributorAuthor

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 freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mhaytermhaytermhayter left review comments

@kostcakostcakostca approved these changes

@adamant-pwnadamant-pwnAwaiting requested review from adamant-pwn

@spike1236spike1236Awaiting requested review from spike1236

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@clumsy@adamant-pwn@mhayter@spike1236@kostca

[8]ページ先頭

©2009-2025 Movatter.jp