this post was submitted on 11 Nov 2023
0 points (50.0% liked)

Advent of Code

295 readers
1 users here now

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

https://adventofcode.com

founded 2 years ago
MODERATORS
0
submitted 1 year ago* (last edited 1 year ago) by mykl to c/adventofcode
 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Proving that the jump in difficulty yesterday wasn't a fluke, today's challenge required careful interpretation of the instructions, as well as parsing a complicated input describing how a bunch of monkeys update and pass values between them. I had originally (ab)used the incredible Petitparser package for this, and was surprised to see this is supported in DartPad so no rewrite was needed. Part two increased the number of rounds dramatically, so using the Least Common Multiple kept numbers under control without moving to BigInts.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here