Python
Clone or download
Permalink
Failed to load latest commit information.
algorithms fix graph/find_shortest_path (#389) Aug 15, 2018
docs update logo path (#382) Jul 27, 2018
tests PR to add some hash problems (#387) Aug 14, 2018
.coveragerc Add coverall to algorithms (#261) Apr 28, 2018
.gitignore Add documentation template (#314) Jun 6, 2018
.travis.yml added exponential and some refactors to maths/ (#361) Jun 21, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jun 25, 2017
CONTRIBUTING.md edited Contributing.md to add 'doc_xxx' (#392) Aug 15, 2018
CONTRIBUTING_JP.md Created README and CONTRIBUTING files in Japanese (#289) May 30, 2018
CONTRIBUTING_KR.md Created CONTRIBUTING_KR.md in Korean (#290) Jun 5, 2018
LICENSE Create LICENSE May 31, 2017
MANIFEST.in remove `tests/*` from MANIFEST.in (#354) Jun 12, 2018
PULL_REQUEST_TEMPLATE.md Created PULL_REQUEST_TEMPLATE.md (#311) Jun 6, 2018
README.md Docs (#391) Aug 15, 2018
README_CN.md fix typo (#385) Jul 28, 2018
README_GE.md update logo path (#382) Jul 27, 2018
README_JP.md update logo path (#382) Jul 27, 2018
README_KR.md update logo path (#382) Jul 27, 2018
README_PTBR.md update logo path (#382) Jul 27, 2018
requirements.txt added exponential and some refactors to maths/ (#361) Jun 21, 2018
setup.py add type of desc. as markdown (#324) Jun 6, 2018
test_requirements.txt added exponential and some refactors to maths/ (#361) Jun 21, 2018
tox.ini WIP: Fix some issues in Travis and add more python env (#323) Jun 7, 2018
tree.md Update tree.md (#332) Jun 7, 2018

README.md

English | 简体中文 | Deutsch | 日本語 | 한국어 | Português

PyPI version Open Source Helpers Build Status Coverage Status

Pythonic Data Structures and Algorithms

Minimal and clean example implementations of data structures and algorithms in Python 3.

Contributing

Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here

Tests

Use unittest

For running all tests write down:

$ python3 -m unittest discover tests

For running some specific tests you can do this as following (Ex: sort):

$ python3 -m unittest tests.test_sort

Use pytest

For running all tests write down:

$ python3 -m pytest tests

Install

If you want to use the API algorithms in your code, it is as simple as:

$ pip3 install algorithms

You can test by creating a python file: (Ex: use merge_sort in sort)

from algorithms.sort import merge_sort

if __name__ == "__main__":
    my_list = [1, 8, 3, 5, 6]
    my_list = merge_sort(my_list)
    print(my_list)

Uninstall

If you want to uninstall algorithms, it is as simple as:

$ pip3 uninstall -y algorithms

List of Implementations

Contributors

The repo is maintained by

And thanks to all the contributors who helped in building the repo.