JP's Blog

  • GitHub * Flickr * Resume
  • Reviews
  • Programming
  • Home Automation
  • Photography
  • Maker
  • Writing
  • Research
  • Search
  • RSS

AoC 2024 Day 3: Mulinator

2024-12-03

Source: Day 3: Mull It Over

Full solution for today (spoilers!).

  • Source: Day 3: Mull It Over
  • Part 1
    • Optimization 1: Use nom
    • Optimization 2: Manual parsing / state machine
  • Part 2
  • Benchmarks

Part 1

Given a string containing (among other gibberish) commands of the form mul({A}, {B}) where {A} and {B} are integers, calculate the sum of A*Bs.

read more...

  • All posts: By Date
  • All posts: By Tag
  • RSS: All
  • RSS: programming/topics

All posts unless otherwise mentioned are licensed under Creative Commons License

Any source code unless otherwise mentioned is licensed under the 3 clause BSD license