...

/

Untitled Masterpiece

Let's solve the Spiral Matrix problem using the Matrices pattern.

Statement

Given an m×nm\times n matrix, return an array containing the matrix elements in spiral order, starting from the top-left cell.

Constraints:

  • 1≤1\leq matrix.length ≤10\leq 10
  • 1≤1\leq matrix[i].length ≤10\leq 10
...