Skip to content

ccprince/advent-of-code-2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Advent of Code 2021

These are my solutions to the puzzles in the 2021 session of Advent of Code. They're not always the best solutions, but they get the right answers. (Well, see the notes, below.)

In previous years, I've skipped any days that weren't fun. Sometimes, that was a problem where a straightforward approach was fine for part one, but insufficient for part 2. Or maybe the solution was just going to take more work than I wanted to put into it. That means my personal best is 40 stars out of 50, which is still pretty respectable.

But, this year, I got solutions for the first 18 days, with only minimal need for hints. So, I'm really hoping to get all the way through it.

Notes

  • Day 12, part 2: This one works, but it takes a long time -- approximately 15 minutes on a moderately fast computer. I didn't worry about optimizing it any further, because that's not an awful amount of time to wait.

  • Day 19: I have a plan for solving this one, but I ran out of time that day. I'm hoping to come back and finish this.

  • Day 22: This is the first one that isn't fully my work. I was able to see the way to go about solving this, by keeping a collection of disjoint cubes that were all lit, and splitting them up when they intersected the new cubes. But, I couldn't wrap my head around the splitting. So, I took someone else's Python solution from the Reddit thread, and adapted it into my code. So, the part-two star for this day is really more of an asterisk.

  • Day 24: I implemented the brute-force approach, and as I should have expected, that's not going to work. Finding the solution requires reverse-engineering the MONAD program, and frankly, that's not my idea of fun. If this is the only day keeping me from getting all 50 stars, I may just cheat, and re-implement someone else's solution. If I solve 47 out of 50 puzzles on my own (and one of those three I got to mostly on my own) I'm still OK with it. It's not like there's anything but my own pride riding on this, and since I already blew past my previous best, I'm plenty proud, already.

About

My solutions to the 2021 Advent of Code puzzles

Topics

Resources

Stars

Watchers

Forks

Languages