jkpr / advent-of-code-2022

Solutions to Advent of Code 2022 in Python 🐍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code 2022

These are my solutions to Advent of Code 2022. The solutions are in the __init__.py files for each day's package. Sometimes, there is an solution in alternate.py (or in an alternate subpackage if the code needs to broken across modules. The main solution code is still in alternate/__init__.py).

Try the problems yourself at https://adventofcode.com/2022/.

Feel free to create a Github issue if you want to discuss anything!

Usage

  1. Clone this repo: git clone https://github.com/jkpr/advent-of-code-2022
  2. Change into the new directory: cd advent-of-code-2022
  3. Run make env to build the environment.
  4. Activate the environment with source env/bin/activate
  5. Run a CLI for day N's code with python3 -m aoc2021 -d N, e.g. python3 -m aoc2021 -d 1.

The CLI is common for each day. The main patterns for options are:

  • -t to run part 1 with test_input.txt
  • -2 to run part 2
  • -t -2 to run part 2 with test_input.txt
  • -t 1 to run part 1 with test_input1.txt
  • -t 1 -2 to run part 2 with test_input1.txt
  • a to run the alternate solution

Table of contents

Day % 5 == 0 Day % 5 == 1 Day % 5 == 2 Day % 5 == 3 Day % 5 == 4
1 · notes · code 2 · notes · code 3 · notes · code 4 · notes · code
5 · notes · code 6 · notes · code 7 · notes · code 8 · notes · code 9 · notes · code
10 · notes · code 11 · notes · code 12 · notes · code 13 · notes · code 14 · notes · code
15 · notes · code 16 · notes · code 17 · notes · code 18 · notes · code 19 · notes · code
20 · notes · code 21 · notes · code 22 · notes · code 23 · notes · code 24 · notes · code
25 · notes · code

Day 1

Day 2

Day 3

Day 4

Day 5

Day 6

About

Solutions to Advent of Code 2022 in Python 🐍

License:The Unlicense


Languages

Language:Python 92.5%Language:Makefile 7.5%