Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 303 Bytes

File metadata and controls

11 lines (8 loc) · 303 Bytes

Problem 1: Orbital Navigation (Spiral Matrix)

Problem Statement

Given an m x n matrix, return all elements of the matrix in spiral order.

Input Format

  • A 2D integer matrix matrix.

Example

Input: matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Output: [1, 2, 3, 6, 9, 8, 7, 4, 5]