4. One of the purposes of asymptotic analysis is to compare algorithms. Use the codes of selection and bubble sort program you have written and decide which algorithm performs better.
I. Use the random number generator you programmed and generate a list of 100 items.
II. Test that array with both selection sort and bubble sort.
III. Compute the time taken for each algorithm to complete.
IV. Repeat step two and three for 1000, 10000, 100000, and 1000000 random numbers.
V. Plot the results in a graph
Comments
Leave a comment