Need help with algorithms?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

keon
18.3K Stars 3.8K Forks MIT License 896 Commits 143 Opened issues

Description

Minimal examples of data structures and algorithms in Python

Services available

!
?

Need anything else?

Contributors list

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

Thanks to all the contributors who helped in building the repo.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.