Learn the fundamentals of data structures and algorithms in Python with simple and easy-to-understand examples. Minimal and clean example implementations of data structures and algorithms in Python 3.
📗 Best Data Structures and Algorithms Books: https://bit.ly/3LHopba
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
For running all tests write down:
$ python3 -m pytest tests
📕 Top 15 Data Structures and Algorithms Books for Every Developer
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)
If you want to uninstall algorithms, it is as simple as:
$ pip3 uninstall -y algorithms
Source: https://github.com
#datastructures #algorithms #python