Question d’entretien chez Amazon

Given a square matrix, implement a function to rotate the matrix 90 degrees.