Track JavaScript (Legacy)
JavaScript (Legacy) track

Spiral Matrix

An exercise from the JavaScript (Legacy) track
medium

About this exercise

Given the size, return a square matrix of numbers in spiral order.

arrays
control flow conditionals
control flow loops
data structures
matrices
View all solutions