NeetCode #905LC-2326MediumMath & Geometry
← Back to All Problems#905 · #2326 · Spiral Matrix IV(螺旋矩阵 IV)
📌 Problem Statement & Constraints
Given two integers
m and n and the head of a singly linked list, fill an m x n matrix with the list's values in spiral order, starting at the top-left and moving clockwise inward. Cells not reached keep the value -1. Constraints: 1 <= m, n <= 10^5, 1 <= m * n <= 10^5, 0 <= Node.val <= 10^5.🔒
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!