Loading problem…
You are rendering data from a rectangular grid in spiral order, starting at the top-left corner and moving right first.
Given an m x n matrix, return all elements of the matrix in spiral order.
m x n
spiralOrder([[1,2,3],[4,5,6],[7,8,9]]); // [1,2,3,6,9,8,7,4,5]
3 hints available with Pro
Medium