Source: Day 15: Warehouse Woes
Full solution for today (spoilers!).
Part 1
Given a warehouse containing floors (
.
), walls (#
), boxes (O
), and the player (@
) plus a series of instructions^V<>
, move the player according to the instructions, pushing boxes (which in turn can push more boxes).Calculate the sum of
y * 100 + x
for each box’s final position.