Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. There's a puzzle each day with two parts. For each part you resolve, you get one one star, so by the end of the 25 days, if you do all the 25 puzzles with both parts you get 50 stars.
This year marked an exciting milestone as I started my new role as a Senior Software Engineer at Glean. To align with my work and further enhance my skills, I decided to tackle the Advent of Code challenges using Kotlin. This choice not only allowed me to apply what I use daily at work but also made solving the puzzles more seamless and enjoyable.
I'm proud to share that I achieved 50 stars once again, maintaining my streak of consistent participation. The puzzles were both engaging and thought-provoking, providing just the right level of challenge to keep me motivated throughout the 25 days.
While I thoroughly enjoyed the variety, I was a bit disappointed that there were no cellular automata puzzles this year. However, the abundance of Dijkstra-related challenges more than made up for it, giving me ample opportunities to dive deep into graph algorithms and pathfinding problems.
Overall, this year's Advent of Code was a perfect blend of professional growth and personal accomplishment, and I'm looking forward to what next year has in store!
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π¦ Advent of Code 2024 π¦ β
β βββββββββββββββββββββββββββββββββ¦ββββββββββββββββββββββββ¦βββββββββββββββββββββββββββββββββββββββββββββ¦βββββββββββ£
β Day β Part 1 β Part 2 β Time β
β βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββ£
β Day 01: Historian Hysteria β 1189304 β
β 24349736 β
β 29 ms β
β Day 02: Red-Nosed Reports β 639 β
β 674 β
β 15 ms β
β Day 03: Mull It Over β 159833790 β
β 89349241 β
β 10 ms β
β Day 04: Ceres Search β 2562 β
β 1902 β
β 124 ms β
β Day 05: Print Queue β 4814 β
β 5448 β
β 138 ms β
β Day 06: Guard Gallivant β 4758 β
β 1670 β
β 3 s β
β Day 07: Bridge Repair β 1289579105366 β
β 92148721834692 β
β 18 ms β
β Day 08: Resonant Collinearity β 240 β
β 955 β
β 5 ms β
β Day 09: Disk Fragmenter β 6310675819476 β
β 6335972980679 β
β 1 s β
β Day 10: Hoof It β 638 β
β 1289 β
β 260 ms β
β Day 11: Plutonian Pebbles β 212655 β
β 253582809724830 β
β 60 ms β
β Day 12: Garden Groups β 1370258 β
β 805814 β
β 304 ms β
β Day 13: Claw Contraption β 28887 β
β 96979582619758 β
β 5 ms β
β Day 14: Restroom Redoubt β 218965032 β
β 7037 β
β 263 ms β
β Day 15: Warehouse Woes β 1406628 β
β 1432781 β
β 491 ms β
β Day 16: Reindeer Maze β 102460 β
β 527 β
β 14 s β
β Day 17: Chronospatial Computer β 6,0,6,3,0,2,3,1,6 β
β 236539226447469 β
β 6 ms β
β Day 18: RAM Run β 324 β
β 46,23 β
β 939 ms β
β Day 19: Linen Layout β 213 β
β 1016700771200474 β
β 360 ms β
β Day 20: Race Condition β 1317 β
β 982474 β
β 1 s β
β Day 21: Keypad Conundrum β 270084 β
β 329431019997766 β
β 1 s β
β Day 22: Monkey Market β 12759339434 β
β 1405 β
β 27 s β
β Day 23: LAN Party β 1108 β
β ab,cp,ep,fj,fl,ij,in,ng,pl,qr,rx,va,vf β
β 221 ms β
β Day 24: Crossed Wires β 57344080719736 β
β cgq,fnr,kqk,nbc,svm,z15,z23,z39 β
β 8 ms β
β Day 25: Code Chronicle β 3133 β
β β
β 15 ms β
ββββββββββββββββββββββββββββββββββ©ββββββββββββββββββββββββ©βββββββββββββββββββββββββββββββββββββββββββββ©βββββββββββ
- I embraced Kotlin, leveraging it from my new role at Glean to solve complex problems efficiently.
- I maintained my streak by achieving 50 stars once again.
- I had a lot of fun and learned a bunch!
Another year, another Advent of Code! I was quite hyped for this one because 2023 wasn't my best year in general.
The challenge for this year was to use Rust. I have read Rust code before, and I have played with some small CLI programs, but I have never used it in anger for as long as this.
There were some amazing problems this year that I enjoyed very much, such as day 19 and day 25, and some that I didn't enjoy like 24, and 21 because either I needed to use third party crates, like Z3 for 24, or there were hidden assumptions in the input such as day 21.
I got very confident in my Rust skills, and I can't wait to use it more for other projects! I was afraid at first that I will get stuck with rust's borrow checker when the problems would get harder, but that has never been the case, and it's a much easier task than I have expected. I only really got stuck with lifetimes once, but I managed to solve the issue quite quickly with the help of the compiler.
Here is a nice table for all the problems of this year, I have generated it in rust too! (It looks better in the terminal with a monospace emoji font)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π¦ Advent of Code 2023 π¦ β
β ββββββββββββββββββββββββββββββββββββββββββ¦βββββββββββββββββββ¦ββββββββββββββββββββββ¦ββββββββββ£
β Day β Part 1 β Part 2 β Time β
β ββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββ¦ββββββ¬ββββββββββββββββ¦ββββββ¬ββββββββββ£
β Day 01: Trebuchet?! β 55538 β β
β 54875 β β
β 402 ΞΌs β
β Day 02: Cube Conundrum β 2600 β β
β 86036 β β
β 141 ms β
β Day 03: Gear Ratios β 527369 β β
β 73074886 β β
β 15 ms β
β Day 04: Scratchcards β 23028 β β
β 9236992 β β
β 433 ΞΌs β
β Day 05: If You Give A Seed A Fertilizer β 157211394 β β
β 50855035 β β
β 76 ΞΌs β
β Day 06: Wait For It β 393120 β β
β 36872656 β β
β 66 ms β
β Day 07: Camel Cards β 248422077 β β
β 249817836 β β
β 6 ms β
β Day 08: Haunted Wasteland β 13301 β β
β 7309459565207 β β
β 14 ms β
β Day 09: Mirage Maintenance β 1696140818 β β
β 1152 β β
β 459 ΞΌs β
β Day 10: Pipe Maze β 6923 β β
β 529 β β
β 4 ms β
β Day 11: Cosmic Expansion β 9545480 β β
β 406725732046 β β
β 82 ms β
β Day 12: Hot Springs β 7771 β β
β 10861030975833 β β
β 28 ms β
β Day 13: Point of Incidence β 32723 β β
β 34536 β β
β 6 ms β
β Day 14: Parabolic Reflector Dish β 112048 β β
β 105606 β β
β 17 ms β
β Day 15: Lens Library β 511257 β β
β 239484 β β
β 344 ΞΌs β
β Day 16: The Floor Will Be Lava β 7472 β β
β 7716 β β
β 238 ms β
β Day 17: Clumsy Crucible β 817 β β
β 925 β β
β 262 ms β
β Day 18: Lavaduct Lagoon β 50603 β β
β 96556251590677 β β
β 83 ΞΌs β
β Day 19: Aplenty β 476889 β β
β 132380153677887β β
β 600 ΞΌs β
β Day 20: Pulse Propagation β 812721756 β β
β 233338595643977β β
β 56 ms β
β Day 21: Step Counter β 3773 β β
β 625628021226274β β
β 441 ms β
β Day 22: Sand Slabs β 403 β β
β 70189 β β
β 12 ms β
β Day 23: A Long Walk β 2250 β β
β 6470 β β
β 4 s β
β Day 24: Never Tell Me The Odds β 11246 β β
β 716599937560103β β
β 2 s β
β Day 25: Snowverload β 507626 β β
β β β
β 221 ms β
βββββββββββββββββββββββββββββββββββββββββββ©βββββββββββββ©ββββββ©ββββββββββββββββ©ββββββ©ββββββββββ
In the end, I succeeded π!!
- I finished all 25 days with both parts for each!
- I learned Rust, and I have managed to write quick and correct programs
- I had a lot of fun and learned a bunch!
By this point Advent of Code and getting 50 stars has become a clear tradition for me.
This year I found the puzzle descriptions way easier to understand, something which I know people and I used to struggle with in the past. The difficult puzzles, 16, 19 and 22 were 3 days apart so I never felt burnt out.
One challenge I set up for myself was to finish as many days as I could fully functionally this year with no side effects and mutation (of course, except input and output).
I did 14/25 days fully functionally. Usually the days I chose to do recursively I did so because of performance reasons. For day23 for example I still have part1 written both functionally and iteratively because I needed the speed for part2. Maybe next year I will pick a language that will help me surpass the speed issues I get with recursion in TS.
In the end, I succeeded π!!
- I finished all 25 days with both parts for each!
- I used Typescript for all the puzzles, and I enjoyed it. Made writing code in a functional way quite easy, the only issue I had was the lack of tail call optimization.
- I had a lot of fun and learned a bunch!
So I got 50/50 stars for the past couple of year, I had to do it now as well!
The pandemic is still not over, but Advent of Code was there for me, something you can count on in this ocean of uncertainty.
Overall I found this year's puzzle harder than the past couple of years, and I think that is mostly because all the hard puzzles were next to eachother with no time to relax in-between. I think that if I would've missed a single puzzle post day 18, I probably wouldn't have been able to catch up and finish on time.
In the end, I succeeded π!!
- I finished all 25 days with both parts for each!
- I used Javascript for all the puzzles, something I haven't done yet when it comes to programming challenges.
- I had a lot of fun!
Last year I planned on getting 50 stars, and, I did it. So I had no choice but to do the same this year π
This year was not an amazing year in general, but Advent of Code was a great end to it. I enjoyed every single puzzle.
This year I participated quite a bit on the subreddit as well with different visualisations of the problems that I've made in Blender.Day 3, Day 4, Day 20 and Day 24. On the first day I even came up with a part 3 to the problem and people started solving it π There's also lessons I've learned this year. For example on day 13 I found out about the Chinese remainder theorem and day 19 showed me that I need to brush up on my Regex skills. Day 20 part 2 took me the longest by far. I tried for 3 days straight to solve it, and in the end, after 7 rewrites, it has proven to be a wrong assumption I made about how you calculate edge values. So that thought me to always question your assumptions when something goes wrong!
In the end, I succeeded π!, and it made 2020 a tiny bit better!
- I finished all 25 days with both parts for each!
- I had the opportunity to use Python which I learned last year!
- I had a lot of fun and learned about a few new things such as the chinese remainder theorem!
Last year, in 2018, I proposed to myself to get 25. One of my bucket lists items for 2019 was to get 50 stars on Advent of Code.
To make it even more interesting, I've set out to learn Python while doing it as well. This way, I will end up with not only more knowledge of algorithms but with an extra tool in my toolset! It proved out to be quite challenging, some days (18 and 22) taking me up to 12 hours to complete (π΄), while others took me less than 15 minutes!
In the end, I succeeded π! I'm still not sure what the plan is for next year, but I can't wait to give it another go!
- I finished all 25 days with both parts for each!
- I've learned Python to a degree which will help me in the future
- I had a lot of fun and learned about a few new things such as memoisation!
In 2017, when I first heard about Advent of Code I've only done the first 7 days and even out of those, two of them I only finished the first part of, ending up with a total of 12 stars.
Now, in 2018, after finishing university, I started working full time. But I still wanted to keep my promise of getting at least 25 stars. It was very hard to keep to that promise with busy schedule but I succeeded π. Out of the 25 days, I finished most of them with 2 stars(16/25). The only challenge I haven't had time to do at all was day 24. Three other days I did not get any star for. Days 15 and 17 work on the example input, there are some edge cases which I found when it comes to the actual input, but I just don't have enough time to debug right now. Day 20 I haven't finished either because even though the regex algorithm I wrote for it works, its way too slow on the real input. And we are talking hours here. So there was no reason to finish that challenge before optimising the regex code first. You could still find these "not finished days" here in this repo.
- I worked on 24 out of the 25 days. Only missed day 24 π£.
- Out of those 24 (which you can find here on this github repo) 21 worked.
- Out of those 21 that worked, 16 gave me two stars.
- I ended up with a total of 37 stars this year!
The goal of each day for me was not to do it in the fastest manner or to have the cleanest, or most optimised code, but rather to get it working and have the logic behind of it understood. That's why this might not be the cleanest C++ code you've seen to date π¬