Selection Sorting in Java

In selection sorting each element is compared with all the following elements of the array. If the element is greater than any following element then swapping is done. After the first cycle we obtain the smallest element at the starting. Now in the second cycle, second element is compared with all following elements to obtain … Read more

Sorting in Java

Sorting is the process through which elements can be arranged in ascending or descending order. Sorting can be done on numbers, strings etc. In Java inbuilt functions are also available to directly sort the series. These inbuilt functions are provided by Collections framework in Java. Example :- Unsorted series = 24, 20, 100, 203, 1, … Read more