Skip to content

Personal solutions to the problems published by the Advent of Code yearly events

Notifications You must be signed in to change notification settings

wmouwen/advent-of-code

Repository files navigation

Advent of Code

This repository contains a set of solutions to the problems published by Eric Wastl for his yearly Advent of Code event.

The repository contains a mixture of different programming languages. Solutions are made to read from stdin and output to stdout.

Puzzles

2015

Day Name Problem Solution Stars
1 Not Quite Lisp link link ★★
2 I Was Told There Would Be No Math link link ★★
3 Perfectly Spherical Houses in a Vacuum link link ★★
4 The Ideal Stocking Stuffer link link ★★
5 Doesn't He Have Intern-Elves For This? link link ★★
6 Probably a Fire Hazard link link ★★
7 Some Assembly Required link link ★★
8 Matchsticks link link ★★
9 All in a Single Night link link ★★
10 Elves Look, Elves Say link link ★★
11 Corporate Policy link link ★★
12 JSAbacusFramework.io link link ★★
13 Knights of the Dinner Table link link ★★
14 Reindeer Olympics link link ★★
15 Science for Hungry People link link ★★
16 Aunt Sue link link ★★
17 No Such Thing as Too Much link link ★★
18 Like a GIF For Your Yard link link ★★
19 Medicine for Rudolph link link ★★
20 Infinite Elves and Infinite Houses link link ★★
21 RPG Simulator 20XX link link ★★
22 Wizard Simulator 20XX link link ★★
23 Opening the Turing Lock link link ★★
24 It Hangs in the Balance link link ★★
25 Let It Snow link link ★★

2016

Day Name Problem Solution Stars
1 No Time for a Taxicab link link ★★
2 Bathroom Security link link ★★
3 Squares With Three Sides link link ★★
4 Security Through Obscurity link link ★★
5 How About a Nice Game of Chess? link link ★★
6 Signals and Noise link link ★★
7 Internet Protocol Version 7 link link ★★
8 Two-Factor Authentication link link ★★
9 Explosives in Cyberspace link link ★★
10 Balance Bots link link ★★
11 Radioisotope Thermoelectric Generators link link ★★
12 Leonardo's Monorail link link ★★
13 A Maze of Twisty Little Cubicles link link ★★
14 One-Time Pad link link ★★
15 Timing is Everything link link ★★
16 Dragon Checksum link link ★★
17 Two Steps Forward link link ★★
18 Like a Rogue link link ★★
19 An Elephant Named Joseph link link ★★
20 Firewall Rules link link ★★
21 Scrambled Letters and Hash link link ★★
22 Grid Computing link link ★★
23 Safe Cracking link link ★★
24 Air Duct Spelunking link link ★★
25 Clock Signal link link ★★

2017

Day Name Problem Solution Stars
1 Inverse Captcha link link ★★
2 Corruption Checksum link link ★★
3 Spiral Memory link link ★★
4 High-Entropy Passphrases link link ★★
5 A Maze of Twisty Trampolines, All Alike link link ★★
6 Memory Reallocation link link ★★
7 Recursive Circus link link ★★
8 I Heard You Like Registers link link ★★
9 Stream Processing link link ★★
10 Knot Hash link link ★★
11 Hex Ed link link ★★
12 Digital Plumber link link ★★
13 Packet Scanners link link ★★
14 Disk Defragmentation link link ★★
15 Dueling Generators link link ★★
16 Permutation Promenade link link ★★
17 Spinlock link link ★★
18 Duet link link ★★
19 A Series of Tubes link link ★★
20 Particle Swarm link link ★★
21 Fractal Art link link ★★
22 Sporifica Virus link link ★★
23 Coprocessor Conflagration link link ★★
24 Electromagnetic Moat link link ★★
25 The Halting Problem link link ★★

2018

Day Name Problem Solution Stars
1 Chronal Calibration link link ★★
2 Inventory Management System link link ★★
3 No Matter How You Slice It link link ★★
4 Repose Record link link ★★
5 Alchemical Reduction link link ★★
6 Chronal Coordinates link link ★★
7 The Sum of Its Parts link link ★★
8 Memory Maneuver link link ★★
9 Marble Mania link link ★★
10 The Stars Align link link ★★
11 Chronal Charge link link ★★
12 Subterranean Sustainability link link ★★
13 Mine Cart Madness link link ★★
14 Chocolate Charts link link ★★
15 Beverage Bandits link link ★★
16 Chronal Classification link link ★★
17 Reservoir Research link link ★★
18 Settlers of The North Pole link link ★★
19 Go With The Flow link link ★★
20 A Regular Map link link ★★
21 Chronal Conversion link link ★★
22 Mode Maze link link ★★
23 Experimental Emergency Teleportation link link ★★
24 Immune System Simulator 20XX link link ★★
25 Four-Dimensional Adventure link link ★★

2019

Day Name Problem Solution Stars
1 The Tyranny of the Rocket Equation link link ★★
2 1202 Program Alarm link link ★★
3 Crossed Wires link link ★★
4 Secure Container link link ★★
5 Sunny with a Chance of Asteroids link link ★★
6 Universal Orbit Map link link ★★
7 Amplification Circuit link link ★★
8 Space Image Format link link ★★
9 Sensor Boost link link ★★
10 Monitoring Station link link ★★
11 Space Police link link ★★
12 The N-Body Problem link link ★★
13 Care Package link link ★★
14 Space Stoichiometry link link ★★
15 Oxygen System link link ★★
16 Flawed Frequency Transmission link link ★★
17 Set and Forget link link ★★
18 Many-Worlds Interpretation link link ★★
19 Tractor Beam link link ★★
20 Donut Maze link link ★★
21 Springdroid Adventure link link ★★
22 Slam Shuffle link link ★★
23 Category Six link link ★★
24 Planet of Discord link link ★★
25 Cryostasis link link ★★

2020

Day Name Problem Solution Stars
1 Report Repair link link ★★
2 Password Philosophy link link ★★
3 Toboggan Trajectory link link ★★
4 Passport Processing link link ★★
5 Binary Boarding link link ★★
6 Custom Customs link link ★★
7 Handy Haversacks link link ★★
8 Handheld Halting link link ★★
9 Encoding Error link link ★★
10 Adapter Array link link ★★
11 Seating System link link ★★
12 Rain Risk link link ★★
13 Shuttle Search link link ★★
14 Docking Data link link ★★
15 Rambunctious Recitation link link ★★
16 Ticket Translation link link ★★
17 Conway Cubes link link ★★
18 Operation Order link link ★★
19 Monster Messages link link ★★
20 Jurassic Jigsaw link link ★★
21 Allergen Assessment link link ★★
22 Crab Combat link link ★★
23 Crab Cups link link ★★
24 Lobby Layout link link ★★
25 Combo Breaker link link ★★

2021

Day Name Problem Solution Stars
1 Sonar Sweep link link ★★
2 Dive! link link ★★
3 Binary Diagnostic link link ★★
4 Giant Squid link link ★★
5 Hydrothermal Venture link link ★★
6 Lanternfish link link ★★
7 The Treachery of Whales link link ★★
8 Seven Segment Search link link ★★
9 Smoke Basin link link ★★
10 Syntax Scoring link link ★★
11 Dumbo Octopus link link ★★
12 Passage Pathing link link ★★
13 Transparent Origami link link ★★
14 Extended Polymerizatio link link ★★
15 Chiton link link ★★
16 Packet Decoder link link ★★
17 Trick Shot link link ★★
18 Snailfish link link ★★
19 Beacon Scanner link link ★★
20 Trench Map link link ★★
21 Dirac Dice link link ★★
22 Reactor Reboot link link ★★
23 Amphipod link link ★★
24 Arithmetic Logic Unit link link ★★
25 Sea Cucumber link link ★★

2022

Day Name Problem Solution Stars
1 Calorie Counting link link ★★
2 Rock Paper Scissors link link ★★
3 Rucksack Reorganization link link ★★
4 Camp Cleanup link link ★★
5 Supply Stacks link link ★★
6 Tuning Trouble link link ★★
7 No Space Left On Device link link ★★
8 Treetop Tree House link link ★★
9 Rope Bridge link link ★★
10 Cathode-Ray Tube link link ★★
11 Monkey in the Middle link link ★★
12 Hill Climbing Algorithm link link ★★
13 Distress Signal link link ★★
14 Regolith Reservoir link link ★★
15 Beacon Exclusion Zone link link ★★
16 Proboscidea Volcanium link link ★★
17 Pyroclastic Flow link link ★★
18 Boiling Boulders link link ★★
19 Not Enough Minerals link link ★★
20 Grove Positioning System link link ★★
21 Monkey Math link link ★★
22 Monkey Map link link ★★
23 Unstable Diffusion link link ★★
24 Blizzard Basin link link ★★
25 Full of Hot Air link link ★★

2023

Day Name Problem Solution Stars
1 Trebuchet?! link link ★★
2 Cube Conundrum link link ★★
3 Gear Ratios link link ★★
4 Scratchcards link link ★★
5 If You Give A Seed A Fertilizer link link ★★
6 Wait For It link link ★★
7 Camel Cards link link ★★
8 Haunted Wasteland link link ★★
9 Mirage Maintenance link link ★★
10 Pipe Maze link link ★★
11 Cosmic Expansion link link ★★
12 Hot Springs link link ★★
13 Point of Incidence link link ★★
14 Parabolic Reflector Dish link link ★★
15 Lens Library link link ★★
16 The Floor Will Be Lava link link ★★
17 Clumsy Crucible link link ★★
18 Lavaduct Lagoon link link ★★
19 Aplenty link link ★★
20 Pulse Propagation link link ★★
21 Step Counter link link ★★
22 Sand Slabs link link ★★
23 A Long Walk link link ★★
24 Never Tell Me The Odds link link ★★
25 Snowverload link link ★★

2024

Day Name Problem Solution Stars
1 Historian Hysteria link link ★★
2 Red-Nosed Reports link link ★★
3 Mull It Over link link ★★
4 Ceres Search link link ★★
5 Print Queue link link ★★
6 Guard Gallivant link link ★★
7 Bridge Repair link link ★★
8 Resonant Collinearity link link ★★
9 Disk Fragmenter link link ★★
10 Hoof It link link ★★
11 Plutonian Pebbles link link ★★
12 Garden Groups link link ★★
13 Claw Contraption link link ★★
14 Restroom Redoubt link link ★★
15 Warehouse Woes link link ★★
16 Reindeer Maze link link ★★
17 Chronospatial Computer link link ★★
18 RAM Run link link ★★
19 Linen Layout link link ★★
20 Race Condition link link ★★
21 Keypad Conundrum link link ★★
22 Monkey Market link link ★★
23 LAN Party link link ★★
24 Crossed Wires link link ★★
25 Code Chronicle link link ★★

Technologies

Go

To run the Go scripts, you need to perform the following steps:

  1. Install Go.

  2. Run the solution for the required day.

    year=2015
    day=1
    set="puzzle"
    go run "./$year/$day/solution.go" < "./problems/$year/$day/inputs/$set.txt"

PHP

To run the PHP scripts, you need to perform the following steps:

  1. Install PHP and Composer.

  2. Assert a valid installation.

    composer check-platform-reqs
  3. Build and run the solution for the required day.

    year=2015
    day=1
    set="puzzle"
    php "./$year/$day/solution.php" < "./problems/$year/$day/inputs/$set.txt"

Python

To run the Python scripts, you need to perform the following steps:

  1. Install Python and pip.

  2. Start a virtual environment.

    python -m venv venv
  3. Activate the virtual environment.

    source venv/bin/activate
  4. Install the dependencies.

    pip install -e .
  5. Run the solution for the required day.

    year=2015
    day=1
    set="puzzle"
    python "./$year/$day/solution.py" < "./problems/$year/$day/inputs/$set.txt"

Rust

To run the Rust scripts, you need to perform the following steps:

  1. Install Rust.

  2. Build and run the solution for the required day. Choose one of two options:

    year=2015
    day=1
    set="puzzle"
    rustc -o "./$year/$day/solution.out" "./$year/$day/solution.rs" &&\
    "./$year/$day/solution.out" < "./problems/$year/$day/inputs/$set.txt"

Alternatively you can use Cargo to build and run the solution:

year=2015
day=1
set="puzzle"
cargo run --bin "$year-$day" < "./problems/$year/$day/inputs/$set.txt"

About

Personal solutions to the problems published by the Advent of Code yearly events

Topics

Resources

Stars

Watchers

Forks