DEV Community

Discussion on: Challenge - Print Spiral

Collapse
 
heikodudzus profile image
Heiko Dudzus

I wanted to allow to build up one single line before printing. I think that would result in a space complexity of O(n). That allows to build an array, but not to build an array containing all entries of the spiral (being O( n2 )).