Question: write code in python Write a function analyze (fxn, data) where fxn is a function (a sorting algorithm) that should be analyzed, and data is
write code in python

Write a function analyze (fxn, data) where fxn is a function (a sorting algorithm) that should be analyzed, and data is a list of input for the function fxn. The function analyze should return a list of times required for the function fxn to run the corresponding input. You need to use a Timer object and its mod timeit similar to how we used it at the beginning of the quarter to analyze the time efficiency of various functions on the Google Colab: Abstractions . \[ \begin{array}{l} t 1=\text { Timer("test1()", "from } \quad \text { main_ import test1") } \\ \text { print("concat ", t1.timeit(number=5), "milliseconds") } \end{array} \] Your function should work with the following driver code. You may need to import or add sorting algorithms to your program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
