This repository contains solutions to the coding challenges from the Advent of Code website. Each year, Advent of Code releases a series of 25 coding challenges, one for each day leading up to Christmas. The challenges can be solved in any programming language, but this repository contains solutions in Python.
To get started with these solutions, first clone the repository to your local machine:
git clone https://github.com/your-username/advent-of-code-python.git
To run the solutions, you'll need to have Python 3 installed on your machine.
Each year's solutions are contained in a separate directory named after the year (e.g. 2015
, 2016
, etc.). Within each year's directory, the solutions for each day are contained in a separate directories which contain a Python file named after the day (e.g. advent1.py
, advent2.py
, etc.).
To run a solution, simply execute the corresponding Python file from the command line:
python src/2021/day06/advent6.py
The input data for each day's challenge is stored in a text file in the same folder as the python code (e.g. src/2015/day1/input.txt
, src/2015/day2/input.txt
, etc.). The input data is read into the Python solution using the open()
function.
If you would like to contribute to this repository, feel free to fork the project and submit a pull request with your changes. Please include unit tests for any new code you add, and make sure that all existing tests continue to pass.
Thank you to the creators of Advent of Code for providing such fun and challenging coding puzzles each year!