Advent of Code 2022
Post by u/paul_sb76: [2022] How would you rate the difficulty of this year's puzzles?
Trivial: 1, 2, 4, 6
Easy: 3, 5, 8, 10, 12, 18, 20, 25
Medium: 7, 9, 11, 13, 14, 15, 21, 23, 24
Hard: 16, 17, 19, 22
I'll use this as the order to finish the rest of the puzzles over time.
cd ./cmd/<dayxx>
go build
Edge case fun with part b on the test input.
./day01 -part a
./day01 -part b
./day02 -part a [-file <filename>] [-debug]
./day02 -part b [-file <filename>] [-debug]
./day03 -part a [-file <filename>] [-debug]
./day03 -part b [-file <filename>] [-debug]
./day04 -part a [-file <filename>] [-debug]
./day04 -part b [-file <filename>] [-debug]
./day05 -part a [-file <filename>] [-debug]
./day05 -part b [-file <filename>] [-debug]
./day06 -part a [-file <filename>] [-debug]
./day06 -part b [-file <filename>] [-debug]
Needs tidied up. Part b doesn't give the answer directly. You need to pick from a list and work out what's the lowest value.
./day07 -part a [-file <filename>] [-debug]
./day07 -part b [-file <filename>] [-debug]
./day08 -part a [-file <filename>] [-debug]
./day08 -part b [-file <filename>] [-debug]
./day09 -part a [-file <filename>] [-debug]
./day10 [-file <filename>] [-debug]
./day11 -part a [-file <filename>] [-debug]
./day11 -part b [-file <filename>] [-debug]
Note for part B: it will print out the complete finished cave system which is fun to look at!
./day14 -part a [-file <filename>] [-debug]
./day14 -part b [-file <filename>] [-debug]
First time using container/ring. Wish it had a few more features, might have to write something which has the extras I needed. Part b added optimisation from dhruvmanila. Changed my solution from taking several hours to under a second!
./day20 -part a [-file <filename>] [-debug]
./day20 -part b [-file <filename>] [-debug]
Need to revisit Part B. I've got the answer so I'm carrying on with other puzzles, but this code is utter crap and needs manual help to get the answer. To make it work, change humnShouts in calcMonkeySpeachPartB(). Set it to 1 to start with, and set changeSteps to a big number (say 1000000000). When the code stops, take the "humn shouts" number output 3 STEPS ABOVE where it stops. Use this number to replace humnShouts in the code, reduce the size of changeSteps, then run again. Repeat until you get the result "humn needs to shout: " and is the result you want.
./day21 -part a [-file <filename>] [-debug]
./day21 -part b [-file <filename>] [-debug]
There's no part B for Day 25. "Just" need to complete all the other days and you're given the last star.
./day25 -part a [-file <filename>] [-debug]