Advent of Code 2023
Find a file
2023-12-20 15:13:39 +01:00
.github Day 18 2023-12-18 20:46:38 +01:00
.vscode Day 13 part 1 2023-12-13 22:26:33 +01:00
benches Added dev container 2023-12-10 02:37:17 +00:00
inputs Refactor and input removal 2023-12-13 00:03:25 +01:00
src Day 19 Part 2 2023-12-20 15:13:39 +01:00
.gitignore Refactor and input removal 2023-12-13 00:03:25 +01:00
Cargo.toml Day 18 2023-12-18 20:46:38 +01:00
README.md Day 19 Part 2 2023-12-20 15:13:39 +01:00

Advent of Code 2023

Build and test LoC GitHub last commit (branch)

What is Advent of Code? 🎄

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. Each day there will be a new problem that is split into 2 parts. The second parts is a more difficult variation of the first part. This repository contains my solutions to the Advent of Code 2023 puzzles

Some of the techniques used in the solutions

Solutions

Day Stars Code Execution Time
Day 01: Trebuchet?! Code 1.003 ms
Day 02: Cube Conundrum Code 0.325 ms
Day 03: Gear Ratios Code 4.476 ms
Day 04: Scratchcards Code 0.867 ms
Day 05: If You Give A Seed A Fertilizer Code 0.360 ms
Day 06: Wait For It Code 0.068 ms
Day 07: Camel Cards Code 2.450 ms
Day 08: Haunted Wasteland Code 3.930 ms
Day 09: Mirage Maintenance Code 0.929 ms
Day 10: Pipe Maze Code 2.291 ms
Day 11: Cosmic Expansion Code 2.566 ms
Day 12: Hot Springs Code 4.443 ms
Day 13: Point of Incidence Code 1.251 ms
Day 14: Parabolic Reflector Dish Code 63.610 ms
Day 15: Lens Library Code 1.274 ms
Day 16: The Floor Will Be Lava Code 19.653 ms
Day 17: Clumsy Crucible Code 197.790 ms
Day 18: Lavaduct Lagoon Code 0.312 ms
Day 19: Aplenty Code 1.084 ms

Try it out

How to run the code?

To run the code, you'll first need to obtain the puzzle inputs from the Advent of Code website and place them in the input folder. Or save your session cookie in the environment variable AOC_SESSION.

You'll also need to have Rust installed on your system. If you haven't installed it yet, you can download it from here. Once you have Rust installed and the inputs in place, you can run all the puzzles using the following command:

# Run all the days
cargo run --release
# Run a specific days
cargo run --release -- day01

How to benchmark the code?

You can benchmark the performance of the code using the following commands:

# Benchmark all the days
cargo bench
# Benchmark a specific days
cargo bench -- day01