DEV Community

Discussion on: Challenge - Print Spiral

Collapse
 
heikodudzus profile image
Heiko Dudzus • Edited

Recursion was the way to go for me, too, because of the recursive structure of spirals. Really nice to see your recursive solutions! :)

I shared your view about how collecting data on the call stack is analogous to building a data structure regarding space complexity, and came to your conclusion to use tail recursion.