Wovi10 / AdventOfCodeCollection

Collection of Advent Of Code years
0 stars 0 forks source link

22_Sand_Slabs_02 #52

Closed Wovi10 closed 1 month ago

Wovi10 commented 8 months ago

--- Part Two --- Disintegrating bricks one at a time isn't going to be fast enough. While it might sound dangerous, what you really need is a chain reaction.

You'll need to figure out the best brick to disintegrate. For each brick, determine how many other bricks would fall if that brick were disintegrated.

Using the same example as above:

Disintegrating brick A would cause all 6 other bricks to fall. Disintegrating brick F would cause only 1 other brick, G, to fall. Disintegrating any other brick would cause no other bricks to fall. So, in this example, the sum of the number of other bricks that would fall as a result of disintegrating each brick is 7.

For each brick, determine how many other bricks would fall if that brick were disintegrated. What is the sum of the number of other bricks that would fall?

Wovi10 commented 1 month ago

Answer = 79144