+ 5

*DAILY-MINI-CHALLENGE* : Write a function that gets a positive int n as input and print the filled matrix (n*n) to the screen!

EXAMPLE n = 3: 4 2 1 7 5 3 9 8 6 EXAMPLE n = 4: 7 4 2 1 11 8 5 3 14 12 9 6 16 15 13 10 PRINT THE MATRIX ALIGNED TO SCREEN! https://code.sololearn.com/cwZ8dYn608Yy/?ref=app

23rd Aug 2017, 10:32 AM
Julian Fechner
Julian Fechner - avatar
23 Respuestas
23rd Aug 2017, 1:10 PM
sayan chandra
sayan chandra - avatar
24th Aug 2017, 2:25 PM
Louis
Louis - avatar
+ 6
Quick question Julian, must the order be random?
23rd Aug 2017, 10:52 AM
Zephyr Koo
Zephyr Koo - avatar
+ 5
I dont believe it is. The order starts from the upper right and goes diagonally from top to bottom-right. You can follow the path of the numbers in the example
23rd Aug 2017, 11:57 AM
Joni Jimenez
Joni Jimenez - avatar
+ 5
I see. Thanks for noticing the pattern @Joni! 👍
23rd Aug 2017, 12:01 PM
Zephyr Koo
Zephyr Koo - avatar
23rd Aug 2017, 1:37 PM
Izi Lior Katie
Izi Lior Katie - avatar
23rd Aug 2017, 7:01 PM
ysraelcon
ysraelcon - avatar
24th Aug 2017, 12:50 PM
m abrate
m abrate - avatar
+ 2
https://code.sololearn.com/cm7p3b9wgYcK/?ref=app
24th Aug 2017, 1:36 AM
hmysjiang🍀
hmysjiang🍀 - avatar
+ 2
My attempt in PHP: https://code.sololearn.com/wr3Xl9g1FP7G/#php Edit: Should work now. Today is not my day.
24th Aug 2017, 7:55 PM
denk_n
denk_n - avatar
24th Aug 2017, 8:23 PM
Nicolas
Nicolas - avatar
+ 2
This is my submission. Thanks for the challenge. @Julian https://code.sololearn.com/cIwuE3clVJOw/?ref=app
26th Aug 2017, 5:40 AM
Sangilivelu
Sangilivelu - avatar
+ 1
Bam, my genius solution. 😎 Not that anyone else's solutions arent genius <3 I love you all https://code.sololearn.com/cl4DcYv8c868/?ref=app
23rd Aug 2017, 2:50 PM
Vari93
Vari93 - avatar
+ 1
HERES THE NEW CHALLENGE... CHECK IT OUT FRIENDS https://www.sololearn.com/discuss/653982/?ref=app
24th Aug 2017, 6:50 PM
sayan chandra
sayan chandra - avatar
26th Aug 2017, 1:51 PM
Julian Fechner
Julian Fechner - avatar
26th Aug 2017, 1:51 PM
Julian Fechner
Julian Fechner - avatar
28th Aug 2017, 8:30 AM
sayan chandra
sayan chandra - avatar
0
Let me submit a last minute in :) https://code.sololearn.com/cNyeRz04OlQh/?ref=app
27th Aug 2017, 5:05 PM
Joni Jimenez
Joni Jimenez - avatar
28th Sep 2017, 1:54 PM
ysraelcon
ysraelcon - avatar
0
vote for your favorite coding language: https://code.sololearn.com/WJqfkcTEguBe/?ref=app
4th Oct 2017, 7:03 PM
Julian Fechner
Julian Fechner - avatar