Advent of Code 2025 in Python.
Install Python 3, then:
cat examples/01 | python 01.pysh test.shhyperfine --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 |
-
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
| Day | Oblique strategy |
|---|---|
| 1 | Mirror, transform, mirror |
| 2 | Solve the inverse |
| 3 | Begin again |
| 4 | Convolve |
| 5 | - |
| 6 | Transpose! |
| 11 | Prune |