Description
Write a class that offers 2 functions that works exactly like the sorted() built-in function in python. Follow the following:
-
-
Function has 3 input parameters: iterable of objects, key, and reversed.
-
-
-
List can be numeric, string, or comparable user defined objects
-
-
-
The function returns a new sorted list
-
-
-
The function also returns:
-
Number of comparisons
-
-
-
-
-
Number of swaps
-
-
-
-
-
Timer measure
-
-
-
-
Implement both bubble and merge sort as the 2 functions offered by your class.
-
-
-
Compare your functions on a randomly generated data
-
-
-
Compare your functions to the built-in sorted() function (time wise)
-
-
-
Present your findings thru plots and summary tables
-
-
Document step-by-step how to use/run your code.