Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.

Example 1: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 … Continue reading Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.