Spiral Matrix

Understand and solve the interview question "Spiral Matrix".

Description

Given an m * n matrix, you have to return all the matrix elements in spiral order. The spiral order signifies traversing the matrix in clockwise order.

Let’s review the spiral order below:

Access this course and 1400+ top-rated courses and projects.