Python 3 implementations of various algorithms and data structures for studying.
Quick sort requires numpy, which you can install with pip, or for users on Ubuntu-based linux distros, by installing the python3-numpy package from aptitude.
To run the tests for one class:
python3 -m unittest path.to.class
For example, to run the binary search tress tests:
python3 -m unittest data_structures.test_binarysearchtree
To run all unit tests:
python3 -m unittest discover
There are also a couple of performance tests that can't be run at the same time as other tests:
python3 -m unittest data_structures.perf_test_trie
- data_structures ** Implement heaps for yourself
- data_structures ** graph
- graph_algorithms ** all of them
- other_algorithms ** all of them
- search_algorithms ** rselect
To run all unit tests:
python3 -m unittest discover
- data_structures ** split heaps into 3 files
- data_structures
- graph
- graph_algorithms
- all of them (FOR SHAME)
- other_algorithms
- all of them (SLACKER)
I'm... not sure why you would?