DEV Community

Discussion on: Challenge - Print Spiral

Collapse
 
heikodudzus profile image
Heiko Dudzus

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.

Collapse
 
yondrin profile image
Alex Doroshenko • Edited

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