Skip to content

mnvr/aoc-25

Repository files navigation

AoC 2025

Advent of Code 2025 in Python.

Running

Install Python 3, then:

cat examples/01 | python 01.py

Test

sh test.sh

Benchmarks

hyperfine --input inputs/01 'python 01.py'
Day Python
1 19 ms
2 75 ms
3 15 ms
4 82 ms
5 18 ms
6 17 ms
7 18 ms
8 276 ms
9 960 ms
11 830 ms

Ahas

  • Day 1 - "Always rotate right, flip the dial if needed" — @jukkasuomela

  • Day 2 - Construct item made of repeated digits and see if they are in range instead of checking item in the range to see if it's made of repeated digits — @zeekar

  • Day 3 - Find the biggest digit in range(prevBiggest + 1, len - remaining +1)@bingbackbook

  • Day 4: Save paper coordinates as set, intersect with neighbour coordinates to reduce — @4HbQ, @znipper

  • Day 6: After transposing, either the separators or the trailing op can be used to delimit numbers. — Reddit megathread

  • Day 7: from collections import Counter@AllanTaylor314

  • Day 8: sorted(combinations(boxes, 2), key=lambda p: math.dist(*p)), frozensets for equality` and other great tips by @AlexTelon

Oblique strategies

Day Oblique strategy
1 Mirror, transform, mirror
2 Solve the inverse
3 Begin again
4 Convolve
5 -
6 Transpose!
11 Prune

About

Advent of Code 2025

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published