[CHALLENGE] Matrix Rotation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

[CHALLENGE] Matrix Rotation

The task is. You have a Matrix NxN. You should rotate it on 90 degrees. Example: N = 3 Input: 1 2 3 4 5 6 7 8 9 Output: 7 4 1 8 5 2 9 6 3 Levels: 1) just rotate matrix 2) matrix is 1D array (1 2 3 4 5 6 7 8 9) 3) input and output is the same memory block (the same array)

20th Feb 2018, 10:17 PM
Непряхин Даниил
Непряхин Даниил - avatar
7 Answers
21st Feb 2018, 4:06 AM
Käzî Mrîdùl Høssäîn
Käzî Mrîdùl Høssäîn - avatar
21st Feb 2018, 5:50 AM
John Wells
John Wells - avatar
21st Feb 2018, 12:39 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
21st Feb 2018, 3:23 PM
VcC
VcC - avatar
20th Feb 2018, 10:32 PM
Непряхин Даниил
Непряхин Даниил - avatar
+ 2
https://www.sololearn.com/discuss/1138295/?ref=app it is a library made by me. It has a transpose function. it will rotate it. there are many other features.
13th Mar 2018, 12:31 PM
Eeshan Narula
Eeshan Narula - avatar