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
19.1K Stars 3.9K Forks MIT License 915 Commits 159 Opened issues

Description

Minimal examples of data structures and algorithms in Python

Services available

!
?

Need anything else?

Contributors list

# 5,892
Python
C
Jupyter...
data-st...
98 commits
# 6,284
C
elastic...
Python
Shell
69 commits
# 620
Jupyter...
Node.js
dijkstr...
binary-...
54 commits
# 3,685
Python
Keras
pytorch
text-mi...
42 commits
# 12,484
Python
data-st...
36 commits
# 20,161
Python
data-st...
18 commits
# 22,575
shortes...
Java
bst
Python
14 commits
# 24,925
Python
data-st...
13 commits
# 15,534
version...
pypi
datadog
python-...
12 commits
# 27,802
Python
data-st...
11 commits
# 27,761
Jupyter...
Shell
CSS
Python
11 commits
# 29,605
Python
data-st...
10 commits
# 29,610
Python
data-st...
10 commits
# 30,000
Python
data-st...
puzzle-...
9 commits
# 31,495
Python
data-st...
9 commits
# 7,268
Shell
python-...
goagent
Java
7 commits
# 32,791
data-st...
TeX
Lua
Bash
7 commits
# 40,511
Python
data-st...
6 commits
# 40,508
Python
data-st...
6 commits
# 2,396
softwar...
Python
data-st...
C
6 commits

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.