DEVRY ECET 370 Entire Course DEVRY ECET 370 Week 4 Lab 4 Complexity of Computat | Página 2

Exercise 4 : Sorting In this week ’ s lecture , the algorithms quicksort and bubblesort are described and implemented . In DocSharing , under the section labeled “ Sorting algorithms ," you can find the class ArrayList where these sorting algorithms are implemented . Write a Java program that times both of them for various values of n . Create a table to record the times . Regarding the efficiency of both sorting methods , what conclusion can be reached from this experiment ? Note : You can probably save development time by using the program from Week 2 to generate a list of the 1000 smallest prime numbers ( in random order ). This list could then be used as the input to the sorting algorithms .