DIY: Rotate Image

Solve the interview question "Rotate Image" in this lesson.

Problem statement

For this problem, you are given a 2D array. You have to implement the function that will rotate the image pixels given in a matrix form clockwise.

Constraints

  • matrix.size() == n
  • matrix[i].size() == n
  • 1 <= n <=
...