This repository contains my solutions for Advent of Code puzzles. Each day's puzzle is stored in a separate folder under the year (for example,
2025/day-01). Solutions are implemented in Python and include the puzzle input file where applicable.
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. One programming puzzle a day is released from 1st to 25th December, divided in two parts (the second of which is unlocked after solving the first). Advent of Code is created by Eric Wastl, and is 100% free.
advent-of-code/
βββ 2025/
β βββ day_1/
β β βββ part-1.py
β β βββ part-2.py
β β βββ input.txt
β βββ day_2/
β β βββ part-1.py
β β βββ part-2.py
β β βββ input.txt
β βββ day_X/
β βββ part-1.py
β βββ part-2.py
β βββ input.txt
βββ README.md
- Each day folder typically contains:
part-1.pyβ solution for part 1part-2.pyβ solution for part 2 (optional)input.txtβ the puzzle input for the day
Run a day's solution using your Python interpreter. Example (PowerShell / Windows):
python .\2025\day-01\part-1.py
python .\2025\day-01\part-2.pyIf a solution reads from input.txt in the same folder it will use that file by default. Ensure you run the command from the repository root or provide the correct path.
βοΈ Day 1: Secret Entrance
-
Part 1: Count the number of times the dial points at 0 after each rotation
-
Part 2: Count every time the dial passes through 0 during any rotation
βοΈ Day 2: Gift Shop
-
Part 1: Find invalid product IDs that are a pattern repeated exactly twice
-
Part 2: Find invalid product IDs where any sequence of digits is repeated at least twice
- Add a new
day-XXfolder under the appropriate year and includeinput.txt,part-1.py, andpart-2.pyas needed. - Open a pull request with a short description of the approach and any notable performance/algorithm details.
