59. Spiral Matrix II

Given an integer n, generate an n x n matrix filled with the numbers 1 through n^2 placed in clockwise spiral order. The fill starts at the top-left cell, moves right along the top row, then down the right column, then left along the bottom row, then up the left column, and repeats inward until every cell holds a value.

Examples
Input: 1
Output: [[1]]
Hints

59. Spiral Matrix II

Given an integer `n`, generate an `n x n` matrix filled with the numbers `1` through `n^2` placed in clockwise spiral order. The fill starts at the top-left cell, moves right along the top row, then down the right column, then left along the bottom row, then up the left column, and repeats inward until every cell holds a value.