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...


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


O-complexity<br>(Random score) (Random score) (Sorted score)<br>O-complexity<br>(Sorted score)<br>Algorithms<br># Comparisons<br># Comparisons<br>Bubble sort<br>Insertion sort<br>Selection sort<br>Quick sort<br>Merge sort<br>Radix sort<br>

Extracted text: O-complexity (Random score) (Random score) (Sorted score) O-complexity (Sorted score) Algorithms # Comparisons # Comparisons Bubble sort Insertion sort Selection sort Quick sort Merge sort Radix sort

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here