re: Challenge - Print Spiral VIEW POST

re: Got it to Level 2, without using arrays at all. On level 2 this becomes purely a math problem, so its solutions will be probably pretty similar in ...

In my first reflections of the code, I picked numbers in the mirrored case where 'bottom_right_num' was top left and 'top_right_num' was bottom left. Picking one with y > -x (above the secondary diagonal) it was easier to understand. Then I could transfer it to the mirrored case. Different names in different cases perhaps could be easier to understand, on the other hand I had kind of bad luck with my choice of examples. ;)

Thanks for your solution and for the link to the playground.


Well, when I finally got the pattern with numbers, it was at the top-right side, so the code kind of reflects this 🙂

Code of Conduct Report abuse