Skip to content

My elegant solutions to the captivating Advent of Code πŸŽ„

License

Notifications You must be signed in to change notification settings

npanuhin/Advent-of-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ„ Advent of Code πŸŽ„


This is a repository of my Advent of Code solutions. Some puzzles are accompanied by concise descriptions πŸ˜‰

I try to optimize each solution as much as possible, so although they are written in Python, many run in less than a second!

Also check out these cool animated annual AoC images!

2020 2021 2023
Day 1 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 2 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 3 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 4 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 5 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 6 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 7 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 8 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 9 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 10 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 11 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 12 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 13 ⭐⭐ ⭐⭐ ⭐⭐
Day 14 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 15 πŸ’ŽπŸ’Ž ⭐⭐ ⭐⭐
Day 16 ⭐⭐ ⭐⭐ ⭐⭐
Day 17 ⭐⭐ ⭐⭐ ⭐⭐
Day 18 ⭐⭐ ⭐⭐ ⭐⭐
Day 19 ⭐⭐ ⭐⭐ ⭐⭐
Day 20 ⭐⭐ ⭐⭐ ⭐⭐
Day 21 ⭐⭐ ⭐⭐ ⭐⭐
Day 22 ⭐⭐ ⭐⭐ ⭐⭐
Day 23 ⭐⭐ ⭐⭐ ⭐⭐
Day 24 ⭐⭐ ⭐⭐ ⭐⭐
Day 25 ⭐⭐ ⭐⭐ ⭐⭐

πŸ’Ž β€” A brief description is available


Some facts about this repository:

  • My goal is to keep solutions as close to the original as possible, so I generally do not edit past solutions. Sometimes I correct the code style (without even remembering what the task was about), but in the future I will try not to do this

I also follow some rules for writing my solutions:

  • The entire repository is PEP8 compliant, as verified by the flake8 linter (with the exception of some rules)

  • Input files may contain any number of empty lines, especially at the end. In some cases, this also applies to whitespace characters.
    Currently I like to handle this rule using the following general snippet to read files:

    with open('input.txt') as file:
        lines = list(filter(None, map(str.strip, file)))

Gallery of amazing annual Advent of Code images

If you computer scruggles to render smooth animations, buy a new one1 :)

2020 2021
2022 2023

Wanna know how I automatically created animated vector images with transparent gradient borders within GitHub Markdown? Check out this folder

Footnotes

  1. Joking of course! It's just that almost all annual AoC images contain a ton of HTML objects, each with its own animation. Rendering one image on a modern hardware is easy, but when there are many of them, it becomes a mess)
    In all seriousness, I'm not sure if I want to hold on to these animations or drop some of them ↩