-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Added breadth_first_search.py #3648
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
Added breadth_first_search.py #3648
Conversation
Thank you to the comments on #3632 |
I see there are already 4 BFS implementations in the |
Oh my god I did not even see that folder, I just went off the comment under the issue I posted (#3260) that said to put it in searches and nobody else replied to that issue so I just went with it. |
For a maintainer to decide then, looking at the other breadth first search algorithms though, it looks like they have to be fed a specific linked list, whereas mine generates a simple maze(optional) where the user only has to specify size, starting and ending location and it will print it the maze before and after it is solved. I could do the same for a different algorithm though it looks like most are covered in that graphs folder. Again, my bad, thought it would be in the searches folder |
@Rolv-Apneseth Ah don't feel bad, the repo is not perfectly organized and contains a lot of redundant stuff. (We actually need people to improve existing files much more than we need new algorithms being submitted, at least in my opinion. Take a look at #2128 ) But as you can see it definitely pays to browse through the repo FIRST. I guess mazes can be converted to graphs and vice versa, but your maze version might be worth having. But I guess it will take a long time to be reviewed. There are other much much less popular TheAlgorithms repos where you could submit this: F#, Haskell, OCaml, Scala, Elm and so on. In the spirit of Hacktoberfest, learn a new language! |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions! |
Added a .py file in the searches folder for breadth-first search algorithm with a pathfind visualisation to show the result.
Included doctests and have already run black, mypy and doctests locally.
In relation to #3260, and retrying from #3632 since I accidentally included commits from another pr in that one.