+ 3

Fill a specific table :

i want simple methode to fill a table of dimension NxN like this table: ---------------> 1 2 3 4 5 | 16 17 18 19 6 V 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 <--------------

31st Mar 2018, 7:07 PM
Ali Yaghi
Ali Yaghi - avatar
5 Antworten
1st Apr 2018, 2:10 PM
Ali Yaghi
Ali Yaghi - avatar
+ 5
That's not the answer. You have to spiral clockwise in single increments, until you reach the centre.
31st Mar 2018, 7:42 PM
Emma
+ 4
This should give you some clues: https://code.sololearn.com/cDM7qLwpjK08/?ref=app The code prints out coordinates, and the integer that should appear at that coordinate. Top left is (0, 0).
1st Apr 2018, 12:50 AM
Emma
+ 2
can you post a code please?
31st Mar 2018, 7:51 PM
Ali Yaghi
Ali Yaghi - avatar
+ 1
thank you Xan , you are a legend
1st Apr 2018, 5:49 AM
Ali Yaghi
Ali Yaghi - avatar