This is a simple implementation for the challenges at Advent of Code 2020. Enjoy!
Each solution was created via cargo new --vcs none day_NN
, and
(usually) have an independent src/part1.rs
and src/part2.rs
, so you
can easily see what was changed to finish the second half.
I focused on a balance between code readability and writing speed: I want to get these done quickly, but I also want to come back at some point and figure out what I did.
Love the story! I need a vacation, too.
Trying to use more idiomatic Rust
today, which includes impl FromStr
. I imagine I'll be seeing a lot of that.
Maybe this use of FromStr
is overkill?
Nah.
OK, List
could have just been a simple function in this
solution. I need to stop with the
FromStr
already.
For some reason, I found today's problem very easy. Guess I'm just a binary thinker.
Part 1 of today's problem was much easier than part 2. I eventually just did a manual set comparison with a special case for the first person, which seems a bit hack.
Digging the FromStr
again for today's
problem. So much string
breakdowns, almost seems like I should have written a grammar or
something.