DIY: Rotate Image
Explore how to rotate an n by n image matrix clockwise by implementing a function in Scala. This lesson helps you understand 2D array manipulations and prepares you for common coding interview problems involving matrix transformations.
We'll cover the following...
We'll cover the following...
Problem statement
For this problem, you are given a matrix. You have to implement the function that will rotate the image pixels given in a matrix form clockwise.
Constraints
matrix.length == nmatrix[i].length == n- 1 <=