Day 20: Grove Positioning System

Puzzle Description

Advent of Code 2022, Day 20

Scala Center Advent of Code 2022, Day 20

This is another one where the porting went really poorly for some reason (probably the botched attempt at making it immutable), so it kind of melted my brain. It works now though.

Benchmark

Part 1

Mean

Error

JVM

39.838 ms

+/- 2.115 ms

JS

125.391 ms

+/- 2.900 ms

Native

58.614 ms

+/- 0.314 ms

Part 2

Mean

Error

JVM

470.262 ms

+/- 3.820 ms

JS

1133.645 ms

+/- 9.724 ms

Native

851.561 ms

+/- 5.992 ms

Run it in the browser!