Advent of Code in C++

January 19, 2026 · View on GitHub

Sometimes when frustration hits hard during AoC trying to solve the puzzles using C you stare with awe at the C++ STL and all the beautiful library functions available. So I decided to try out C++ in order to get the best of both worlds. Still in control, but with some useful toolkits available. I am aiming to learn "Modern C++" and will aim to learn C++ 20 standard. Will take some iterations before I can utilize the full potential of the library functions. Some of the code will be near C to start with.

While I try to learn the benefits and caveats of C++ I also decided to take on the challenge to learn CMake, why this part of the repo is built using CMake. Will be interesting.

2024:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
4⭐⭐
5⭐⭐
6⭐⭐
7⭐⭐
8⭐⭐
9⭐⭐
10⭐⭐
11⭐⭐
13⭐⭐
14⭐⭐
15

2023:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐0.223 ms3.368 msRanges, ranges, ranges...
2⭐⭐0.303 ms0.280 msStill don't like this...
3⭐⭐Not a very modern approach. Straight translation of C solution. Will look into this again later.
4⭐⭐
8⭐⭐Interesting how "easy" it is to program C++ in "Python style" using the STL...
11⭐⭐Very "loopy" approach, but working nicely for these sizes of input.

2022:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
3

2021:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2
3⭐⭐

2020:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
3⭐⭐
4⭐⭐
5⭐⭐
15⭐⭐
17⭐⭐

2019:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2
3⭐⭐

2018:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
3⭐⭐
4⭐⭐

2017:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
3⭐⭐

2016:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐

2015:

DayStarsTiming Part 1Timing Part 2Comment
1⭐⭐
2⭐⭐
3⭐⭐Fun with classes