Pergunta de entrevista da empresa Block

Rotating 2D arrays 90, 180, and 270 degrees, basic 2D manipulation question