BETA

Difficulty Level: Basic

Submissions: 4295 Accuracy:

36.46%

Reverse sub array
     

Reverse a sub array in an array.

Input:

The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N,N is the size of array.
The second line of each test case contains N input A[i].
The third line of each test case contains L and R, L is left index of array and R is right index of array.

Output:

Print the modified array.

Constraints:

1 ≤ T ≤ 50
1 ≤ N ≤ 100
1 ≤ A[i] ≤ 1000
1 ≤ L ≤ R ≤ N

Example:

Input:
1
7
1 2 3 4 5 6 7
2 4

Output:
1 4 3 2 5 6 7 

 

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

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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