Module day11

Source
Expand description

§Chronal Charge

Building a summed-area table allows us to compute the power of any rectangle with only 4 array lookups.

This makes the total complexity O(n³), however the calculation for each size is independent so we can parallelize over multiple threads.

Structs§

Result
Shared šŸ”’

Functions§

parse
part1
part2
square šŸ”’
Find the (x,y) coordinates and max power for a square of the specified size.
worker šŸ”’