Sort The Array
Submissions: 31437   Accuracy:

29.25%

  Difficulty: Basic   Marks: 1

Given a random set of numbers, Print them in sorted order.

Input:
The first line of input contains an integer T, denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer N denoting the size of array. The second line contains N space-separated integers A1, A2, ..., AN denoting the elements of the array.

Output:
Print each sorted array in a seperate line. For each array its numbers should be seperated by space.

Constraints:
1 ≤ T ≤ 10
1 ≤ N ≤ 1000
1 ≤A[i]<100

Example:
Input:
1
2
3 1

Output:
1 3

Explanation:
Testcase 1:
The array after sorting is: 1 3.

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.