An array consisting of n elements is given. Write a program that sorts the array in non-decreasing order.
The first line contains a natural number, n(1≤n≤1000).
The second line contains n numbers separated by spaces, ai(1≤ai≤1000).
A single line of the sorted array.
5 3 1 2 5 4
5 4 3 2 1
Login to be able to submit.