Commit Graph

5 Commits

Author SHA1 Message Date
da25b73eca
day16: use tail recursion unstead of passing mutable state 2023-12-16 11:07:39 -08:00
842def62dc
day16: back to elegant recursion now that we track beams
problem 1 solution was busting the stack, so used an iterative approach,
but now that we track lit beams we can bail out early enough not to bust
the stack. performance is the same but it's much nicer.
2023-12-15 23:54:22 -08:00
427a0c766b
day16: much cleaner, nicely factored solution, and much faster 2023-12-15 23:42:43 -08:00
332620db0f
day16: problem 2 solution 2023-12-15 22:39:03 -08:00
a8ec929818
day16: problem 1 solution 2023-12-15 22:19:46 -08:00