Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calebmadrigal/algorithms-in-python
Algorithms and Data Structures implemented in Python
https://github.com/calebmadrigal/algorithms-in-python
Last synced: 16 days ago
JSON representation
Algorithms and Data Structures implemented in Python
- Host: GitHub
- URL: https://github.com/calebmadrigal/algorithms-in-python
- Owner: calebmadrigal
- License: mit
- Created: 2015-05-23T04:51:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-23T04:57:02.000Z (over 9 years ago)
- Last Synced: 2024-10-12T15:50:11.959Z (about 1 month ago)
- Language: Python
- Size: 184 KB
- Stars: 95
- Watchers: 8
- Forks: 34
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Algorithm Implementations
This is just a collection of algorithms I wanted to implement in order to improve my understanding. They are NOT optimized and probably shouldn't be used in production code.
To run all unit tests:
python3 -m unittest discover test
## quicksort
Recursive implementation of the quick sort algorithm.
To run tests:
python3 quicksort.py
## mergesort
Recursive implementation of the merge sort algorithm.
To run tests:
python3 mergesort.py
## hashtable
Simple hashtable implementation
## autoresizelist
A helper class used to implement the heap.
To run tests:
python3 autoresizelist.py
## heap
Implementation of a heap.
To run tests:
python3 heap.py
## nqueens
Backtracking solution to the n-queens problem (just finds the first one).
To run:
python3 nqueens.py
To run tests:
python3 -m unittest discover test --pattern="*nqueens*"
## combinatorics
Various combinatoric functions like permutations and combinations.
To run:
python3 combinatorics.py