Pergunta de entrevista da empresa Amazon

Rotate a m-by-n matrix either clockwise or counterclockwise.