|
|
|
|
|
by saagarjha
2758 days ago
|
|
I’m not OP, but if I were solving this I’d just take the smallest square less than that number, figure out where it is (the top left or bottom right corner), and then “run” the algorithm from there, which should only require one “turn” at the most. You really don’t need to know anything about spirals in particular; just look for a pattern that you can take advantage of to reduce your work. |
|
Anyway I’m sure I won’t ever encounter that spiral as long as I live but if I do, I have code prepped for it :D