NeetCode #904LC-885MediumMath & Geometry
← Back to All Problems#904 · #885 · Spiral Matrix III(螺旋矩阵 III)
📌 Problem Statement & Constraints
Starting at
(rStart, cStart) in a rows x cols grid, walk clockwise in a spiral: east, south, west, north, then east again, expanding the radius each time a full cycle is completed. Return the coordinates of all rows * cols cells in the order they are first visited, skipping any cell outside the grid. Constraints: 1 <= rows, cols <= 100, 0 <= rStart < rows, 0 <= cStart < cols.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!