πΎ Archived View for gerikson.com βΊ gemlog βΊ misc βΊ AoC-2021.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
β‘οΈ Next capture (2021-12-04)
-=-=-=-=-=-=-
This is a mirror of the main blog post
And we're off!
I wonder if I got a bit too clever by half in this solution, as I've been looking over older solutions and can't even remember solving them. But that's how it goes I guess.
Puzzle rating: 3/5
Score: 2
A "standard" Perlish solution (well, *my* kind of Perl, anyway): a dispatch table for the else/if "switch" construct, and a compact hash containing the state of the two solutions.
Puzzle rating: 3/5
Score: 2
I was honestly surprised that the canonical solution to this wasn't some esoteric bit-twiddling trick that reduces it to a one-liner.
In part 2, the naive solution is to loop through each "column" to determine which values to count so as to determine whether they are most frequent or not. I used an index for each "set" to keep track of the values already assigned to that set.
Puzzle rating: 3/5
Score: 2
ββββββββββββββββββββββββββββββββββββββββββββ
Updated on Friday, 2021-12-03
β more posts in the βΉmiscβΊ category
About this category: βWhat is says in the URL pathβ
Copyright Β© 2018 - 2021 Gustaf Erikson