A Python module to learn all the major algorithms on the go!
Purely for educational purposes
- Super easy to use
- A very easy to understand Documentation
- Get the code right in your editor
- Get time complexities on the go
- Just fire the following command in your terminal:
pip3 install pygorithm
- It's that easy. If you are using Python 2.7 use pip instead. Depending on yourpermissions, you might need to use
pip install --user pygorithmto install.
- To sort your list
frompygorithm.sortingimportbubble_sortmyList= [12, 4, 3, 5, 13, 1, 17, 19, 15] sortedList=bubble_sort.sort(myList) print(sortedList)- To get the code for function used
frompygorithm.sortingimportbubble_sortcode=bubble_sort.get_code() print(code)- To get the time complexity of an algorithm
frompygorithm.sortingimportbubble_sorttime_complexity=bubble_sort.time_complexities() print(time_complexity)- Just type in the following command to run the tests
python3 -m unittest
- This will run all the tests defined in the files of the
tests/directory