mediumDSA

Spiral Matrix

Return all elements of a matrix in spiral order.
Ensure function signatures match starter code to run test cases.
index.js
Loading...

Test Case #1

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

Expected: [1,2,3,6,9,8,7,4,5]

Solve Spiral Matrix | Algorithmic Interview Drill