#3 is making me feel really dumb lol. I feel like there's a simple way to get the answer with math, without needing to actually build a circular data structure, but I just can't figure it out. I tried sleeping on it, but it still looks like magic lol.
The max distance is the square root of the number. So for 23, the square root is 4.etc, and you can see that the corners are all 4 moves away from the center or less, while rounding that square root shows that there's 5 rows and columns. Also, it doesn't really matter where the "end" is, as the end can always be in the top left corner (index 0 in a list), and it'll still be the same distance from the center. But that doesn't help, as that doesn't let you know if you're in a corner or the center, so you can't just know that it's (number of rows/2) steps.
I feel like I'm thinking way too hard about this, and should just try to brute force it, but that feels ugly...