Advent of Code 2022 Challenges
Day | Title | Description |
---|---|---|
Day 1 | Calorie Counting | Read values into a list and find the top 1 and top 3 |
Day 2 | Rock Paper Scissors | Determine scores based on rules. Used dictionaries |
Day 3 | Rucksack Reorganisation | Split input and see if duplicates in lists |
Day 4 | Camp Cleanup | Split input and see if ranges overlap |
Day 5 | Supply Stacks | Processing the input data was tricky. Problem is list pop |
Day 6 | Tuning Trouble | Sliding Window and substring check |
Day 7 | No Space Left on Device | Create a tree structure from the input using dictionaries |
Day 8 | Treetop Tree House | Horrible. Use NP maps, but spent far too long on Part 2 |
Day 9 | Rope Bridge | A pain to render (not complete), but uses lists and sets to track the position |
Day 10 | Cathode-Ray Tube | Determine value of X based on instructions and print to screen |
Day 11 | Monkey In The Middle | Part 2 used massive numbers, used some RSA crypto math for modulo congruence so that for addition and multiplication operations we only care about the remainder. We can work out the correct value for the mod value by using the LCM. See code for full details |
Day 12 | Hill Climbing Algorithm | Djiska's search with bounding on the neighbour list. Part 2 brute forced rather than optimising and starting at the end position |
Day 13 | Distress Signal | NOT ATTEMPTED - Requires some strange nested list parsing |
Day 14 | Regolith Reservoir | Modelling rocks and sand falling - used a class for sand, and NP array to model the cave. WITH VISUALISATION USING PYGAME |
Day 15 | ||
Day 16 | ||
Day 17 | Pyroclastic Flow | Tetris type puzzle. Determine the height of the tower after 2022 shapes and 1 Trillion shapes. Part 2 required determining a repeating pattern by caching the board state and checking for repeats. Used multiple classes to store shape and board state. WITH ASCII VISUALISATION |
Day 18 | Boiling Boulders | NOT ATTEMPTED: A 3d puzzle |
Day 19 | ||
Day 20 | ||
Day 21 | Monkey Math | Recursive algorithm to work out result of nested equation. Part 2 uses a modified binary search to narrow down on the result |
Day 22 | ||
Day 23 | ||
Day 24 | ||
Day 25 | Full of Hot Air | Conversion of text into base 5 numbers |