Problem 54035. Matrix Rotation
You are given a 2D matrix of dimension [m,n] and a positive integer r. You have to rotate the matrix r times and print the resultant matrix. Rotation should be performed in alternating layers of matrix
Example (for r=1)
Start with rotating the outer layer counter-clockwise, reverse the direction with each layer.
See test suite for further clarity.
Solution CommentsShow comments
Problem Recent Solvers6