Work in Progress
Python 2.7
Not meant for practical use; for educational purposes only.
The goal of this repo is to demonstrate concepts, such as what certain alogrithms do, using Python syntax to keep things simple, even though the code will be doing things that don't make sense to do in Python / any real production scenario.
basic Object Oriented example
- Animal ✅
- Cat ✅
- Dog ✅
- Unicode animal emoji methods ✅
- associated unit tests ✅
algorithms
- sort
- Bubble Sort ✅
- Merge Sort (recursive) ✅
- Quicksort (Hoare partition scheme) ✅
- Quicksort (middle pivot) ✅
- Insertion Sort ✅
- Selection Sort ✅
- search
- Linear Search ✅
- Binary Search ✅
other:
- ackermann
- Fibonacci Sequence (implementations using various approaches)
- some threading examples.
- May want to move these out into their own repo demonstrating race conditions
unittest
CLI:
# all tests
python -m unittest
# individual test
python -m unittest tests.test_fibonacci
from examples.sort.quick import QuickSortMiddlePivot
QuickSortMiddlePivot.quick([2,6,1,7,3,2])