Advent of Code 2024
Solutions for 2024
Language: Python
- Parse the input and find the difference and add them up
- Some numbers appear in both lists, so calculate a similarity score
- Nice easy introduction for day 1
- Getting the input in the right shape was easy
- Pre-calculate part two with collections.Counter rather than counting each time
- Check to see if the reports are all increasing or decreasing
- Check the reports, but with the ability to remove one value
- Make a function and loop through the input
- Use the same function, but with another function to edit possible input
- Find the sum of the multiply statements - but find them first
- There’s a switch that turns the statements on and off
- Regex only on day 3. Find the mul() statements, then evaluate them
- Find the do() and don’t() statements as well, then iterate
- Do a word search for XMAS
- Actually search for MAS in in X shape
- Iterate for X and then go for different directions
- Iterate for A and then go for different directions
- Sum up the middle value of the updates that are in the correct order
- Sort the bad updates into the correct order and sum the middle values
- Loop through the lists and if subsequent numbers are in the correct order, the whole list is in order
- For the bad lists, place the pieces in the correct order, then sum up. More difficult than it sounds