Left Rotate Matrix K times
Submissions: 6900   Accuracy:

28.6%

  Difficulty: Basic   Marks: 1

Given a Matrix of size M x N. Your task is to print the matrix K times left rotated.

Input:
First line consists of T test cases. First line of every test case consists of 3 integers, M, N, K. Second line of every test case consists of M*N spaced integers.

Output:
Single line output, print the M*N spaced integer rotated K times.

Constraints:
1<=T<=100
1<=M,N,K<=100

Example:
Input:

1
2 2 1
1 2 3 4
Output:
2 1 4 3 

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

Contributor: Saksham Raj Seth
Author: support3


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.



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


to report an issue on this page.