🎅 🎄 🎁 🎅 🎄 🎁 🎅 🎄 🎁 🎅 🎄 🎁 🎅 🎄 🎁 🎅 🎄 🎁
- Typescript
- 0 dependencies, except for tooling like Typescript and Eslint
- No AI
- Take it easy. No ambition to solve everything or to score on the leaderboard, just having fun when I have time (Unlike 2022 when I grinded through all 25 puzzles)
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- Solution ⭐⭐
- TBD
- Solution ⭐
- Solution ⭐
- Solution ⭐⭐
- Solution ⭐
- Solution ⭐⭐
- TBD
- TBD
- TBD
- TBD
- TBD
- TBD
- TBD
- TBD
- TBD
Solving the wrong problem is a big waste of time!
Use those exact ones in unit tests
[11, 2].sort()
does NOT yield [2, 11]
- They get sorted by their first digit. Need to do [11, 2].sort((a, b) => a - b)
Yes, looking at you, Node test runner! Why is this such a pain with you?
Make sure the test data does not have an empty extra line at the end, or consider those when parsing. When testing the parsing, use if possible the real input files and not inline strings, as they might be missing small details like that additional empty extra line.
Related to this, make sure to use LF line endings! Actually had a couple of bugs in some of the parsing functions due to CRLF being used instead of LF. Unfortunately, prettier can not parse .txt
files, so we also added an .editorconfig
just for line endings.
# expected: 22.x.x
node -v
# otherwise, install
nvm install 22
nvm use 22
# install dependencies
npm i
# run all days
npm run aoc
# run a specific day
npm run aoc day=1
# run in watch mode
npm run aoc watch
# run only tests marked as only
npm run aoc only
# run all validations
npm run validate
1111111111111111111111111111111
1.............................1
1.............................1
1.............................1
1.............................1
1..............1..............1
1.............111.............1
1............11111............1
1...........1111111...........1
1..........111111111..........1
1............11111............1
1...........1111111...........1
1..........111111111..........1
1.........11111111111.........1
1........1111111111111........1
1..........111111111..........1
1.........11111111111.........1
1........1111111111111........1
1.......111111111111111.......1
1......11111111111111111......1
1........1111111111111........1
1.......111111111111111.......1
1......11111111111111111......1
1.....1111111111111111111.....1
1....111111111111111111111....1
1.............111.............1
1.............111.............1
1.............111.............1
1.............................1
1.............................1
1.............................1
1.............................1
1111111111111111111111111111111