Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

Java Program to Sort the Elements in ascending order.

Get array size n and n elements of array, then sort the elements of array in ascending order.

Sample Input 1:

5 5 7 9 3 1

Sample Output 1:

1 3 5 7 9

Program or Solution


Program Explanation

With the help of Selection sort this program is done