Skip to content

shnako/advent-of-code-2021

Repository files navigation

Advent of Code 2021 🎄

It's been a while since I used Python, so I'll use AoC 2021 as a refresher.

I tried to make the code as clean and easy to read as possible, and I've also provided a short explanation to most solutions so that they're easier to understand.

Day Puzzle Solution Results Input Text
01 Sonar Sweep Day 01 solution Day 01 test Day 01 input Day 01 puzzle
02 Dive! Day 02 solution Day 02 test Day 02 input Day 02 puzzle
03 Binary Diagnostic Day 03 solution Day 03 test Day 03 input Day 03 puzzle
04 Giant Squid Day 04 solution Day 04 test Day 04 input Day 04 puzzle
05 Hydrothermal Venture Day 05 solution Day 05 test Day 05 input Day 05 puzzle
06 Lanternfish Day 06 solution Day 06 test Day 06 input Day 06 puzzle
07 The Treachery of Whales Day 07 solution Day 07 test Day 07 input Day 07 puzzle
08 Seven Segment Search Day 08 solution Day 08 test Day 08 input Day 08 puzzle
09 Smoke Basin Day 09 solution Day 09 test Day 09 input Day 09 puzzle
10 Syntax Scoring Day 10 solution Day 10 test Day 10 input Day 10 puzzle
11 Dumbo Octopus Day 11 solution Day 11 test Day 11 input Day 11 puzzle
12 Passage Pathing Day 12 solution Day 12 test Day 12 input Day 12 puzzle
13 Transparent Origami Day 13 solution Day 13 test Day 13 input Day 13 puzzle
14 Extended Polymerization Day 14 solution Day 14 test Day 14 input Day 14 puzzle
15 Chiton Day 15 solution Day 15 test Day 15 input Day 15 puzzle
16 Packet Decoder Day 16 solution Day 16 test Day 16 input Day 16 puzzle
17 Trick Shot Day 17 solution Day 17 test Day 17 input Day 17 puzzle
18 Snailfish Day 18 solution Day 18 test Day 18 input Day 18 puzzle
19 Beacon Scanner Day 19 solution Day 19 test Day 19 input Day 19 puzzle
20 Trench Map Day 20 solution Day 20 test Day 20 input Day 20 puzzle
21 Dirac Dice Day 21 solution Day 21 test Day 21 input Day 21 puzzle
22 Reactor Reboot Day 22 solution Day 22 test Day 22 input Day 22 puzzle
23 Amphipod Day 23 solution Day 23 test Day 23 input Day 23 puzzle
24 Arithmetic Logic Unit Day 24 solution Day 24 test Day 24 input Day 24 puzzle
25 Sea Cucumber Day 25 solution Day 25 test Day 25 input Day 25 puzzle

Structure

Solutions

The corresponding files for each solution are grouped within a dayXX folder. Each package contains:

  • solution.py: my implementation of the solution to the puzzle
  • test_solution.py: the test containing the result, confirming the algorithm works
  • puzzle.txt: a dump of the puzzle text from the website, with the source link at the top
  • input.txt: the puzzle input I received

Running

  1. Open this project in PyCharm.
  2. Open the solution or test you want to run.
  3. Right click it and press Run 'solution'.

Results

Dashboard

Advent of Code 2020 Dashboard Result

Company Leaderboard

Anonymized Private Company Leaderboard