https://github.com/raeperd/advent-of-code
https://github.com/raeperd/advent-of-code
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raeperd/advent-of-code
- Owner: raeperd
- Created: 2025-12-01T15:34:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-03T14:37:46.000Z (7 months ago)
- Last Synced: 2025-12-04T04:52:23.490Z (7 months ago)
- Language: Python
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2025
Solutions for [Advent of Code 2025](https://adventofcode.com/) in Python.
## 01
- edge case on starting from 0
- + and - handling for mod
- simple while can fix issue
- linear thinking for circular problems - count multiples crossed instead of simulating
- integer division for boundaries - `(n // 100) * 100` finds nearest multiples
## 02
- care max number of partition
- `for-else` - detects loop completion without break
- divisibility filters patterns early - `len % k == 0` before checking
## 03
- finding max value, greedy might work
- suffix constraint - when picking k items, leave room for remaining picks
- greedy works for lex-max - highest digit first always wins
## 04
- variable scope matters - reset counter per cell, not per row
- only check target cells (`@`), not all cells in grid
- 8-direction neighbor check - tuple iteration `(di, dj)` with bounds checking
- repeated removal - loop until no changes in a pass