Commit graph

7 commits

Author SHA1 Message Date
2f3f892c0e Solve 2021:6 "Lanternfish" part 1 2021-12-06 07:15:37 +01:00
f82b6cd9b5 Solve 2021:5 "Hydrothermal Venture"
Tricky part, got the test data correct at part 1 long before the actual input gace the correct answers. Pure luck I guess.

Part 2 I got stuck on, and resolved to visualization by a loop of
prints.
2021-12-05 08:30:54 +01:00
661440e4ce Solve 2021:4 "Giant squid" 2021-12-04 07:12:00 +01:00
99f5385f25 Solve 2021:3 "Binary Diagnostic"
Yes, I do "".join(). Python is not always beautiful.

I began reusing part 1 for part 2, until I realised you cannot reuse the
Counter.most_common, and you need the actual values to be able to se
equal occourences.

I probably lost 5-15 minutes just to dribble with 3 levels of nested
objects. In GMT+1 before coffee, that cost me.

Part 2 was way uglier before some well motivated refactoring. Since all
tests and expected output were in place, refactoring was easy.
2021-12-03 07:29:34 +01:00
d63c7463cc Solve 2021:2 "Drive!" 2021-12-02 06:42:42 +01:00
9976edc457 Solve 2021:1 "Sonar sweep"
Felt a bit slow and rusty. Tooling was not set up properly on the
computer which decreased the flow.

Anyhow, fun first day! Could have been done more pythonic with list sequences, and readability would have increased with more use of sum() and lambdas. But this is not what Advent of Code is about.
2021-12-01 06:38:45 +01:00
Anders Ytterström
d5a29d41e2 🔧 Setup Advent of Code 2021
This year: Elixir! And maybe python.
2021-10-22 17:17:55 +02:00