How kuldeep9071/advent-of-code-2024 works
Project type and purpose
• This is a collection of standalone C++ solutions for the Advent of Code 2024 daily puzzles.
• Each “DayX” folder holds two parts of a puzzle (Problem1.cpp and Problem2.cpp), its input data, and the corresponding output.
• There is no central server, front-end, or long-running service—each solution is a self-contained command-line program.
File structure
• Top-level directories: Day1, Day2, …, Day25 plus README.md.
• Inside each DayN folder:
• Problem1.cpp and Problem2.cpp (source code)
• input.txt (puzzle input)
• output.txt (captured output)
• Build instructions exist only in the README—no build scripts or CI configs in the repo.
Key insights from README
• Solutions are built with g++ (C++17) and run with a timeout.
• No external libraries beyond the C++ standard library.
• Usage is purely command-line based.
Main components
a. Source code modules (Problem1.cpp, Problem2.cpp for each day)
b. Input data files (input.txt)
c. Build system (g++ compiler + timeout wrapper)
d. Executable artifacts (DayN_Part1, DayN_Part2)
e. Output files (output.txt)
Relationships and interactions
• The developer invokes the compiler (g++) on a .cpp file and input.txt.
• The compiler produces an executable.
• The executable consumes input.txt at runtime (via stdin).
• The executable writes results to stdout or redirects into output.txt.
Repeatability
• That Days 1–25 follow the same pipeline.
Essential architectural elements
• No external services or databases—everything is local files and command-line tools.
• Compile→run→output cycle.
• Technological details (C++17, g++, timeout) near the “Build Environment” block.