Skip to content

Advent Of Code 2021 (Solutions)

License

Notifications You must be signed in to change notification settings

codemonkey-uk/aoc-2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aoc-2021

Advent Of Code 2021 (Solutions)

About

This depot contains my solutions to the 2021 puzzles, as written.

It is NOT an example of best practice, or ideal solutions.

This depot is just me, getting it done in C++ as quick as I could.

There has been is no follow-up refactoring, or tidy up, aside this last README edit.

The C++ used is C++17 and contains no 3rd party code or SDKs.

It does contain copies of graph (astar) and Geometry/math code I'd written for other projects already on github.

The versions in this depot will not be updated, see instead:

Notes

I completed puzzles 1-15 on the day without problems.

Day 6 "Lanternfish" is notable as the first with a potential performance "gotcha" on part 2.

Day 8 is a fun puzzle, but the puzzle is was not in how to program it.

Day 15 might have been hard without my A* library code to lean on.

Day 16 was my first setback, I left it until evening before I starting and it just took me longer than I would have liked to finish part 1. I went to bed without starting part 2.

I finished Day 16 on Day 17, and day 18 on the 18th.

Day 19 seemed like it was going to need a lot of maths code, so I did the day 17 puzzle instead. I didn't come back to 19 until after the 25th.

Day 20, 21 and 22 I did on the day. 22 I pulled in my Geometry / math library code to make use of an AABB class I had.

Day 23 I hit performance problems, and did not complete part 2 until after the 25th.

Day 24 I could not solve on the day.

Day 25 I completed after the family Christmas celebrations were all wrapped up.

Day 19, day 23 part 2, and day 24 were difficult. I pushed myself outside of my comfort zone to solve the math for arbitrary rotations in my solution for 19. It took a couple of days and some hard thinking but I am happy with the solution.

Day 23 I just scrapped a passable solver, but I made a number of poor choices on that one early on.

Day 24 had me stumped for a while, and I went off on several fruitless wild tangents, as you will see if you take a look at the code.

If you have any questions, please feel free to get in touch.

https://twitter.com/codemonkey_uk

About

Advent Of Code 2021 (Solutions)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published