Skip to content

Commit e6faec1

Browse files
authored
grid formatting 2.0
1 parent a1ae785 commit e6faec1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

problems/2582/katie.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
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+
| 1 | 2 | 3 | 4 |
7+
|---|---|---|---|
8+
| x | 1 | 2 | 3 |
9+
| 6 | 5 | 4 | x |
10+
| . | . | . | . |
911

1012
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).
1113

0 commit comments

Comments
 (0)