Search⌘ K
AI Features

Spiral Matrix II

Spiral Matrix II gives you a positive integer n and asks you to return an n by n matrix containing every value from 1 through n squared in spiral order.

Statement

Given a positive integer n, create an ...