Microsoft logoMicrosoft
CodingMembers

Spiral Matrix (LC 54) + Follow-Ups

Members only

Traverse a 2-D matrix in clockwise spiral order and return the values as a one-dimensional sequence. Follow-ups switch to counterclockwise traversal and to filling an n × n matrix in spiral order.

SWE
array
grid
simulation
medium
Frequency
Single report
Last asked
2026-08-16
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...