BETA

Submissions : 6903 Accuracy :

50.07

Rotate Array by n elements
     

Given an array of size n, rotate it by d elements. 

Input: The first line of the input contains T denoting the number of testcases. First line of test case is the number of elements 'n' and elements 'd' to be rotated. Second line of test case will be the array elements.
Output: Rotated array is displayed to the user.


Constraints:

1 <=T<= 50
1 <=n<= 100
d<=n
1 <=arr[i]<= 100


Example:

Input:
2
5 2
1 2 3 4 5 
10 3
2 4 6 8 10 12 14 16 18 20

Output:
3 4 5 1 2
8 10 12 14 16 18 20 2 4 6

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to 'Test' your code before clicking 'Submit' button!



                   



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