Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
- As much as possible, try to follow the existing format of markdown and code.
All ▲lgorithms Python Library Structure
- Directories and files are all in lower case letter.
- Files are separated by an underscore (
_) following the
- Directories in documentation are separated by a minus or hyphen (
We follow this structure
├── allalgorithms │ │── sorting | | │── bubble_sort.py | | └── merge_sort.py │ └── searches | │── binary_search.py | └── linear_search.py ├── docs │ │── sorting | | │── bubble-sort.md | | └── merge-sort.md │ └── searches | │── binary-search.md | └── linear-search.md └── tests │── test_searches.py └── test_sorting.py
Adding new algorithms
- Make your pull requests to be specific and focused. Instead of contributing "several algorithms" all at once contribute them all one by one separately (i.e. one pull request for "Binary Search", another one for "Bubble Sort" and so on).
- Describe what you do in code using comments.
Please DO NOT EDIT CHANGELOG on your pull requests, this is must be edited by one of the write access maintainers when they going to drop a new release.
This repository follow the PEP8 Style Gide for Python, so make sure you lint your code before adding a new pull request.
.py file should have the following header. (no for testing files)
# -*- coding: UTF-8 -*- # # Binary search works for a sorted array. # The All ▲lgorithms library for python # # Contributed by: Carlos Abraham Hernandez # Github: @abranhe #
If the algorithm is modified, this should be included there also.
# Contributed by: Carlos Abraham Hernandez # Github: @abranhe # # Modified by: Your Name # Github: @yourgithubusername
If the algorithm have been modified by multiple contributors, that should be included as follow.
# Contributed by: Carlos Abraham Hernandez # Github: @abranhe # # Modifiers: # Your Name, @yourgithubusername # Your friend's name, @yourfriendongithub
Please make sure if you add an algorithm, you also add the required
documentation for it the
Follow some of the examples already added.
If you are modifying an algorithm make sure you add a benchmark using Repl.it for the maintainers to have it easy to review it.
Lastly and not less important:
Make sure you start