Computer Science, asked by geotronpaul, 10 months ago

8) Write a Java program to perform Selection sort on a double array of length 5 which contains the population of India for the years 2000 to 2005.

Answers

Answered by Yashipandey99
2

Answer:

There is your answer

Explanation:

Java Program for Selection Sort

The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.

1) The subarray which is already sorted.

2) Remaining subarray which is unsorted.

In every iteration of selection sort, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the sorted subarray

please follow me

Similar questions