CPKit
v1.6.1

Matrix Rotation

OperationsEasy

Rotate matrices cyclically by 90°, 180°, or 270° clockwise or counter-clockwise.

Alt+Shift+3

Configuration Panel

Complexity Indices

Time ComplexityO(R * C)
Auxiliary SpaceO(R * C) rotated buffer
Conceptual Overview

Matrix rotation shifts all elements cyclic-wise by 90°, 180°, or 270° clockwise or counter-clockwise. For rectangular matrices, dimensions are transposed.

Source: CP-Algorithms reference guide