Given an array A[N], you are required to sort the array in given index range [a, b], i.e., you need to sort subarray A[a..b]
The first line of input contains an integer T denoting the Test cases. Then T test cases follow.
The first line contains an integer N i.e number of array elements.
The second line contains array elements A[i]
The third line contains a and b
For each test case, the output is the sorted array as per the given range [a, b]
1 ≤ T ≤ 100
1 ≤ N ≤ 10^5
0 ≤ A[i] ≤ 10^6
0 ≤ a<=b ≤ N-1
7 8 4 5 2
7 2 4 5 8
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.