Advent of Code 2022
My partner and I are working on Advent of Code this year to practice and have a fun activity to do together. Advent of Code is a daily Christmas theme coding puzzle.
Check out this sub-reddit for more solutions.
Day | Part 1 | Part 2 |
---|---|---|
Day 1 | ⭐ | ⭐ |
Day 2 | ⭐ | ⭐ |
Day 3 | ⭐ | ⭐ |
Day 4 | ⭐ | ⭐ |
Day 5 | ⭐ | ⭐ |
Day 6 | ⭐ | ⭐ |
Day 7 | ⭐ | ⭐ |
Day 8 | ⭐ | ⭐ |
Day 9 | ⭐ | ⭐ |
Day 10 | ⭐ | ⭐ |
Day 11 | ⭐ | ⭐ |
- Day 1: Its been 2 years since I wrote any code. Getting the env set up and fixing all my git mistakes was definitely the hardest part
- Day 2: After thinking I would use match-case to code the strategy I quickly remembered that dictionaries are the solution to every problem
- Day 3: Ok, maybe sets are the solution to every problem. Was maybe thinking I might code up a solution for arbitrary number of intersecting item in arbitrary groups but decided my life isn't only about AoC
- Day 4: feeling very grateful for part 2s that are easier than part 1s. Trying to improve my code documentation as well
- Day 5: My partner hard coded the input and saved an hour of her life. I did not. Used deque for the first time. And had to implement some tests to make sure I wasn't going to miss out on any points
- Day 6: Some relief thank goodness. Starting to implement type hinting
- Day 7: Took a couple days to get to it. Did some OOP and got to practice some recurssion. Now I know that using a tree structure would have been much faster
- Day 8: numpy arrays so much easier to index for this type of thing. Reminded me of algorithms I would write in grad school
- Day 9: back on the wagon after many days away!
- Day 10 & 11: Fun problems, pretty addicting. Took a while to figure out part 2 of day 11 part relatively easy to implement