Skip to content

Latest commit

 

History

History
181 lines (121 loc) · 4.19 KB

File metadata and controls

181 lines (121 loc) · 4.19 KB

GitHub go.mod Go version Go Report Card

advent2022

Advent of Code 2022

Commentry from Reddit

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.

Instructions

Compiling the code

cd ./cmd/<dayxx>
go build

Days of Advent

Day 1 - Calorie Counting

Edge case fun with part b on the test input.

./day01 -part a
./day01 -part b

Day 2 - Rock Paper Scissors

./day02 -part a [-file <filename>] [-debug]
./day02 -part b [-file <filename>] [-debug]

Day 3 - Rucksack Reorganization

./day03 -part a [-file <filename>] [-debug]
./day03 -part b [-file <filename>] [-debug]

Day 4 - Camp Cleanup

./day04 -part a [-file <filename>] [-debug]
./day04 -part b [-file <filename>] [-debug]

Day 5 - Supply Stacks

./day05 -part a [-file <filename>] [-debug]
./day05 -part b [-file <filename>] [-debug]

Day 6 - Tuning Trouble

./day06 -part a [-file <filename>] [-debug]
./day06 -part b [-file <filename>] [-debug]

Day 7 - No Space Left On Device

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]

Day 8 - Treetop Tree House

./day08 -part a [-file <filename>] [-debug]
./day08 -part b [-file <filename>] [-debug]

Day 9 - Rope Bridge

./day09 -part a [-file <filename>] [-debug]

Day 10 - Cathode-Ray Tube

./day10 [-file <filename>] [-debug]

Day 11 - Monkey in the Middle

./day11 -part a [-file <filename>] [-debug]
./day11 -part b [-file <filename>] [-debug]

Day 12 -

Day 13 -

Day 14 - Regolith Reservoir

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]

Day 15 -

Day 16 -

Day 17 -

Day 18 -

Day 19 -

Day 20 - Grove Positioning System

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]

Day 21 - Monkey Math

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]

Day 22 -

Day 23 -

Day 24 -

Day 25 - Full of Hot Air

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]