Module day18

Source
Expand description

ยงBoiling Boulders

The lava droplet is a fixed size so we can use a one dimensional fixed size array to store the cube data for speed.

For part two we use the flood fill algorithm starting from any corner to fill the outside space with water. We then use the same exposed edge counting approach as part one, but only considering faces that touch a water drop.

Constantsยง

SIZE ๐Ÿ”’

Functionsยง

count ๐Ÿ”’
flood_fill ๐Ÿ”’
parse
part1
part2