Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
5 lines (4 loc) · 287 Bytes

README.md

File metadata and controls

5 lines (4 loc) · 287 Bytes

Spiral_Matrix1

Prints 1 to n^2 numbers in a spiral order.

For printing, we start writing from zero,zero index towards Right direction then to Down then to Left and lastly to Right. Till we reach the last point. In doing so,we keep a track of the rows and columns that are traversed.