#C5683. Sorting Multiple Arrays

    ID: 49359 Type: Default 1000ms 256MiB

Sorting Multiple Arrays

Sorting Multiple Arrays

You are given \(T\) test cases. In each test case, you are given an integer \(N\) representing the number of elements followed by \(N\) space-separated integers. Your task is to sort each array in non-decreasing order.

The input is provided via standard input (stdin) and the output should be printed to standard output (stdout). For each test case, print the sorted array on a new line. Elements in an array should be separated by a single space.

inputFormat

The first line of the input contains an integer \(T\) denoting the number of test cases. Each test case consists of two lines:

  • The first line contains an integer \(N\) indicating the number of elements in the array.
  • The second line contains \(N\) space-separated integers.

Input is taken from stdin.

outputFormat

For each test case, output the sorted array in non-decreasing order on a new line. The elements of each array should be separated by a single space. The output is printed to stdout.

## sample
2
5
3 1 2 5 4
3
3 2 1
1 2 3 4 5

1 2 3

</p>