Spiral Matrix | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Spiral Matrix

WAP to create a odd number square spiral matrix like: if matrix is 3×3 5 4 3 6 1 2 7 8 9 if matrix is 5×5 17 16 15 14 13 18 5 4 3 12 19 6 1 2 11 20 7 8 9 10 21 22 23 24 25.... write it in any language

3rd Feb 2018, 11:28 AM
Pratyush Saxena
Pratyush Saxena - avatar
5 Answers
+ 17
have a look at this well-commented code of John sir https://code.sololearn.com/c8CxJboIHmAQ/?ref=app
3rd Feb 2018, 1:54 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
4th Feb 2018, 4:33 AM
Käzî Mrîdùl Høssäîn
Käzî Mrîdùl Høssäîn - avatar
+ 3
3rd Feb 2018, 11:29 AM
VcC
VcC - avatar
+ 2
https://code.sololearn.com/ccUyCmPbBgXn/?ref=app. look at this please
3rd Feb 2018, 4:07 PM
Ujjwal Kumar
Ujjwal Kumar - avatar
13th Mar 2018, 12:28 PM
Eeshan Narula
Eeshan Narula - avatar