Skip to content

Commit a1ae785

Browse files
authored
grid formatting?
1 parent 11ff6c7 commit a1ae785

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

problems/2582/katie.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Initial thoughts (stream-of-consciousness)
44
I took a couple examples and wrote them down in a grid like so:
55

6-
__ 01 02 03 04 05
7-
10 09 08 07 06 __
8-
__ 11 12 13 14 15
6+
__ 01 02 03 04 05 \\
7+
10 09 08 07 06 __ \\
8+
__ 11 12 13 14 15 \\
99

1010
Which made me realize it was a parity problem. If you take `n-1` as your divisor, the quotient will tell you what row it ends up on and the remainder will tell you how many indeces in from the edge you have to go (the direction changes based on the parity of the quotient).
1111

0 commit comments

Comments
 (0)