5 ms·
I love in Day 2 how he represents the keypad in string form, padded with . characters to simplify the edge detection logic.
by Tycho 10y ago
I love in Day 2 how he represents the keypad in string form, padded with . characters to simplify the edge detection logic.
- kornish 10y agoAlso love how he aliases `str.split` to `Keypad` so you can see the intention of his semantics that much more easily. And the assertion of keypad[2][2], as a quick reference point for himself. The whole thing is just so eminently understandable.