This repository is my personal take on solving the Advent of Code riddles. AoC is a fun coding challenge held every December, where each day brings a new puzzle to solve. I enjoy the mix of algorithmic thinking and creative solutions it requires, so I built this setup to make working on the puzzles as smooth as possible.
The code is structured to be modular and reusable, so I can quickly adapt to each day’s puzzle without repeating boilerplate. While I keep things clean and organized, I don’t go overboard with features like full error handling — it’s all about solving the puzzles and having fun.
- Open the project in Visual Studio (configured for VS19 with C++17).
- Place the input data for the specific day in
dayXX/inputXX.txt. - Build the solution and run the executable.
Each puzzle is different, but the general workflow is:
- Parse the input data (often messy and challenging).
- Break down the problem into smaller parts.
- Use whatever algorithms or tricks fit best — sorting, searching, dynamic programming, or sometimes just brute force if it’s good enough.
I prioritize readability and maintainability, but I also enjoy squeezing out optimizations when needed.
The repository is organized by day:
dayXXfolders: Contain the code and input files for each puzzle.solvedPuzzles.h: Keeps track of which days are implemented.main.cpp: Runs all the solved puzzles.
- Create a new folder for the day (
dayXX). - Write your solution in
CDayXX.handCDayXX.cpp. - Add the header to
solvedPuzzles.h. - Push it to the
puzzleslist inmain.cpp.
That’s it! The setup takes care of the rest.
I love coding challenges because they keep my skills sharp and let me play with algorithms in a creative way. Advent of Code is also a great tradition, and this repository is my way of capturing that journey.