Minimal examples of data structures and algorithms in Python
Clone or download
jessicapaz and keon Add hailstone algorithm (#434)
* Add hailstone algorithm in maths

* Add hailstone in README file

* Change type terms to int

* Add hailstone test
Latest commit 81d0e4d Oct 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode PEP8 style sweep (#393) Oct 8, 2018
algorithms Add hailstone algorithm (#434) Oct 30, 2018
docs update logo path (#382) Jul 27, 2018
tests Add hailstone algorithm (#434) Oct 30, 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
CODE_OF_CONDUCT_FR.md Doc fr (#394) Aug 19, 2018
CONTRIBUTING.md edited Contributing.md to add 'doc_xxx' (#392) Aug 15, 2018
CONTRIBUTING_FR.md Doc fr (#394) Aug 19, 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 Add hailstone algorithm (#434) Oct 30, 2018
README_CN.md Doc fr (#394) Aug 19, 2018
README_FR.md Doc fr (#394) Aug 19, 2018
README_GE.md Doc fr (#394) Aug 19, 2018
README_JP.md Doc fr (#394) Aug 19, 2018
README_KR.md Doc fr (#394) Aug 19, 2018
README_PTBR.md Doc fr (#394) Aug 19, 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 | Français

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.