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

35.375 ms

+/- 0.464 ms

JS

82.511 ms

+/- 0.177 ms

Native

59.569 ms

+/- 0.310 ms

Part 2

Mean

Error

JVM

478.492 ms

+/- 5.897 ms

JS

1044.893 ms

+/- 84.466 ms

Native

921.742 ms

+/- 57.039 ms

Run it in the browser!