This code tests a random "array" or a defined array and output sorting algorithms' runtime.
Output example:
sorted() 0.0013935565948486328
binaryinsertionsort 1.1698744297027588
bubblesort 6.8355393409729
heapsort 0.06599664688110352
mergesort 0.03871798515319824
timsort 0.05826759338378906
Thanks to GeeksforGeeks for the sorting algorithms.
Issue:
- Quicksort crashes often, was removed.
Goals:
- Testing time complexity theories
- Comparing with built-in function
Opinion:
- The built-in function in Python is great