Left Rotate Matrix K times
Basic Accuracy: 30.21% Submissions: 7459 Points: 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 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.