Ad

Given two array rotate a 90 degrees clockwise NxN matrix.

for example

I = [
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]

output should be

O = [
[ 3, 6, 9],
[ 2, 5, 8],
[ 1, 4, 7]
]

public class Matrix {
  public static int[,] rotate(int[,] rotate) {
    int[,] o = {{3,6,9},{2,5,8},{1,4,7}};
    return o;
  }
}