PATTERN 15 · 3 PROBLEMS
Matrix traversal & transforms
Treat coordinates and boundaries as state; mark or rotate without losing original information.
Start the first lesson ↗MASTER KEYWrite the coordinate mapping before the loops.
0OF 3
RECALLED
RECALLED
Clockwise rotation equals transpose followed by reversing each row.
Not started
↗02Rotate Image
Clockwise rotation equals transpose followed by reversing each row.
Not started
↗03Spiral Matrix
Four boundaries shrink after their corresponding edge is consumed.
Not started
↗Set Matrix Zeroes
The first row and column can store markers, with separate flags for their original state.