Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 280 Bytes

README.md

File metadata and controls

16 lines (14 loc) · 280 Bytes

spiral-array-peeler

Function that takes an n*m array as input and returns a "spiral" path through the array, starting in the upper-left corner and moving clockwise.

example: input = [ [1, 2, 3], [8, 9, 4], [7, 6, 5] ] output = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]