1. Implement Bubble sort, Insertion sort, Selection sort, Quick sort, Merge sort and Radix sort algorithms (use static method). 2. Assume there are 21 students in your class. Take random scores (in the range of 0 to 100) of 21 students using an Integer array named stdScore. Hint to generate a random score: Random rand = new Random(); Integer score = rand.nextInt(100); 3. To perform the descending order sorting, pass the stdScore array (random score) while invoking each of the sorting algorithm you have implemented in step 1. Count number of comparisons required for performing descending order sorting. 4. Repeat step 3 by passing the already sorted stdScore array. Count number of comparisons required for descending order sorting. 5. Fill up the following table using the results you got from Step 3 and 4
1. Implement Bubble sort, Insertion sort, Selection sort, Quick sort, Merge sort and Radix sort
algorithms (use static method).
2. Assume there are 21 students in your class. Take random scores (in the range of 0 to 100) of
21 students using an Integer array named stdScore. Hint to generate a random score: Random
rand = new Random(); Integer score = rand.nextInt(100);
3. To perform the descending order sorting, pass the stdScore array (random score) while
invoking each of the sorting
comparisons required for performing descending order sorting.
4. Repeat step 3 by passing the already sorted stdScore array. Count number of comparisons
required for descending order sorting.
5. Fill up the following table using the results you got from Step 3 and 4
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 16 images