Day 20: Grove Positioning System

Puzzle Description

Advent of Code 2022, Day 20

Scala Center Advent of Code 2022, Day 20

Full Solution Source

My Solution for 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

28.465 ms

+/- 0.451 ms

JS

73.502 ms

+/- 1.197 ms

Native

64.697 ms

+/- 0.126 ms

Part 2

Mean

Error

JVM

301.899 ms

+/- 4.919 ms

JS

777.220 ms

+/- 12.835 ms

Native

826.985 ms

+/- 2.224 ms

Run it in the browser!