Skip to content

Advent of Code (2023 & 2024 — Rust)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

AndrejOrsula/aoc

Repository files navigation

Advent of Code

Rust Docker deps.rs codecov.io

My solutions to Advent of Code puzzles.

Edition

All benchmarks are run on a Dell Precision 5550 laptop with an Intel Core i7-10875H CPU.

D Puzzle Code Part 1 Performance Part 2 Performance
1 Historian Hysteria day1.rs 92.26 µs 69.56 µs
2 Red-Nosed Reports day2.rs 67.96 µs 141.4 µs
3 Mull It Over day3.rs 81.17 µs 79.13 µs
4 Ceres Search day4.rs 257.6 µs 142.3 µs
5 Print Queue day5.rs 98.64 µs 133.9 µs
6 Guard Gallivant day6.rs 39.48 µs 6.768 ms
7 Bridge Repair day7.rs 824.2 µs 49.06 ms
8 Resonant Collinearity day8.rs 40.13 µs 36.43 µs
9 Disk Fragmenter day9.rs 186.2 µs 134.5 ms
10 Hoof It day10.rs 210.9 µs 82.03 µs
11 Plutonian Pebbles day11.rs 215.0 µs 5.208 ms
12 Garden Groups day12.rs 1.319 ms 1.974 ms
13 Claw Contraption day13.rs 87.33 µs 72.88 µs
14 Restroom Redoubt day14.rs 35.37 µs 20.60 ms
15 Warehouse Woes day15.rs 234.6 µs 241.8 µs
16 Reindeer Maze day16.rs 5.066 ms 5.353 ms
17 Chronospatial Computer day17.rs 2.124 µs 26.82 µs
18 RAM Run day18.rs 219.9 µs 291.5 µs
19 Linen Layout day19.rs 8.696 ms 8.696 ms
20 Race Condition day20.rs 335.5 µs 17.31 ms
21 Keypad Conundrum day21.rs 529 ns 476 ns
22 Monkey Market day22.rs 7.427 ms 13.17 ms
23 LAN Party day23.rs 326.8 µs 147.2 µs
24 Crossed Wires day24.rs 85.72 µs 23.31 µs
25 Code Chronicle day25.rs 30.94 µs

All benchmarks are run on a Dell Precision 5550 laptop with an Intel Core i7-10875H CPU.

D Puzzle Code Part 1 Performance Part 2 Performance
1 Trebuchet?! day1.rs 84.70 μs 930.8 µs
2 Cube Conundrum day2.rs 113.7 μs 127.9 µs
3 Gear Ratios day3.rs 513.8 μs 437.6 µs
4 Scratchcards day4.rs 119.9 μs 141.4 µs
5 If You Give A Seed A Fertilizer day5.rs 26.96 μs 126.6 µs
6 Wait For It day6.rs 17.14 μs 1.325 µs
7 Camel Cards day7.rs 246.9 μs 243.3 µs
8 Haunted Wasteland day8.rs 505.3 µs 1.223 ms
9 Mirage Maintenance day9.rs 204.0 µs 165.1 µs
10 Pipe Maze day10.rs 343.3 µs 386.1 µs
11 Cosmic Expansion day11.rs 8.282 ms 8.252 ms
12 Hot Springs day12.rs 753.5 µs 9.231 ms
13 Point of Incidence day13.rs 418.4 µs 202.9 µs
14 Parabolic Reflector Dish day14.rs 148.3 µs 38.40 ms
15 Lens Library day15.rs 220.8 µs 290.3 µs
16 The Floor Will Be Lava day16.rs 656.0 µs 20.19 ms
17 Clumsy Crucible day17.rs 78.87 ms 289.0 ms
18 Lavaduct Lagoon day18.rs 32.68 µs 45.76 µs
19 Aplenty day19.rs 259.7 µs 283.5 µs
20 Pulse Propagation day20.rs 4.687 ms 21.60 ms
21 Step Counter day21.rs 6.556 ms 87.39 ms
22 Sand Slabs day22.rs 41.73 ms 61.43 ms
23 A Long Walk day23.rs 2.656 ms 2.5840 s
24 Never Tell Me The Odds day24.rs 1.586 ms 2.4002 s
25 Snowverload day25.rs 246.0 ms

Instructions

Rust

Get Answers and Run Performance Benchmarks

Thanks to cargo-aoc, answers and performance benchmarks for all days are obtainable by running the main binary.

cargo run --release

Test the Correctness of Solutions

All days also include tests using sample inputs from the puzzle descriptions.

cargo test

License

This project is dual-licensed to be compatible with the Rust project, under either the MIT or Apache 2.0 licenses.