Spiral Inward
Hard · Algorithms
Put a ball on every square of the world, but do it in a spiral: go along the bottom row, up the right side, back along the top, down the left side, and keep curling inward until you reach the middle.
Never put two balls on the same square. Your code runs in several worlds of different sizes, including a world that is only one column wide.
Hint: measure the first row and the first column, and notice that each side of the spiral is one shorter than the side before it.
Next: Biggest Pile Last