BETA
Reverse an Array
Submissions: 29155   Accuracy:

40%

  Difficulty: School
*School Problem's Submission isn't counted in score!
     

Given an array, print reverse of it.

Input:

First line contains an integer, the number of test cases 'T' Each test case should contain an integer, size of array 'N' in the first line. The second line contains the space seperated intergers of the array.

Output:

Print the array in reverse order in a single line separated by space.Each array is to be printed in separate line.

Constraints:

1 <= T <= 100

1 <= N <=100

0 <= Arr[i] <= 100

Example:

Input
1
4
1 2 3 4

Output:
4 3 2 1

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

Author: shef5


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