#K82632. Sorting an Integer Array
Sorting an Integer Array
Sorting an Integer Array
You are given an array of integers. Your task is to sort the array in non-descending order.
Input Format: The first line contains an integer ( n ) denoting the number of elements in the array. The second line contains ( n ) space-separated integers.
Output Format: Print the sorted array in a single line separated by spaces.
Example: If the input is 6\n3 1 2 6 4 5
, then the output should be 1 2 3 4 5 6
.
inputFormat
The first line contains a single integer ( n ) ((1 \leq n \leq 10^5)). The second line contains ( n ) space-separated integers, where each integer is between (-10^9) and (10^9).
outputFormat
Output the sorted array in non-descending order in a single line, with each element separated by a space.## sample
6
3 1 2 6 4 5
1 2 3 4 5 6