Day 21: Monkey Math

Puzzle Description

Advent of Code 2022, Day 21

Scala Center Advent of Code 2022, Day 21

Full Solution Source

My Solution for 2022, Day 21

This was a fun one to port, and I was able to clean up the parsing function. A good day.

Benchmark

Part 1

Mean

Error

JVM

3638.841 μs

+/- 22.942 μs

JS

6557.388 μs

+/- 45.210 μs

Native

3955.518 μs

+/- 2.485 μs

Part 2

Mean

Error

JVM

3729.368 μs

+/- 8.715 μs

JS

6698.237 μs

+/- 38.376 μs

Native

4026.246 μs

+/- 2.251 μs

Run it in the browser!