Using Java Design Implement Selection Sort Algorithm Sort List Number Largest Smallest Num Q37148166

Using JAVA

Design and implement a selection sort algorithm to sort a listof number from the largest to the smallest.

The numbers are: 0.1 5 10.5 9.8 3.3 5.6 8.5 7.3 1.5 99.930.4

Design and implement a merge sort algorithm to sort a list ofnumber from the largest to the smallest.

The numbers are: 0.1 5 10.5 9.8 3.3 5.6 8.5 7.3 1.5 99.9 30.


Solution


color{blue}underline{1:}

public class SelectionSort { public static void selectionSort(double[] arr) { double temp; int minInd;

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.