-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: python impl for 0-1 BFS #1336
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request! Could you please rebase it on the current master branch, so that workflows run correctly? Also I noticed that you have provided an implementation of Dijkstra algorithm using What you actually want here is probably |
Sure, tried to follow the C++ original as much as possible. It worked for several test cases, but I'll switch to |
@clumsy Please don't indent codeblock's backticks in markdown i.e. make sure |
Indenting here is okay, because it uses Material's content tabs feature. |
Exactly, without this change there are no C++/Python tabs to switch from. This follows the same format as other pages with examples in two languages. |
Personally I think there should only be one implementation, and a good reason to have multiple. If we have python as pseudocode, then it shouldn't be hidden in a content tab. My 2c |
I'm generally fine with having both C++ and Python. The latter is more beginner-friendly, mostly simple to review and can also be used in problems where performance doesn't matter as much, e.g. for Project Euler problems, which is also the reason I've included both in continued fractions article (well, and also because with continued fractions, you are much more likely to require big integers). I think it's fine to use it as a second default, when available. It doesn't really take anything from article's quality, and can be useful for some people. Hiding it in content tabs is, IMO, fine because the majority of CPers still use C++, and using tabs allows to preserve article space, so that only people for whom Python code would actually be useful will actually open it. |
+1 to what @adamant-pwn said. |
Preview the changes for PR #1336 at https://gh.cp-algorithms.com/1336/ (current version: 9260362). |
The base branch changed, will cut another PR. |
Adding python implementation, fixing a minor grammatical error.