Problem 959 · Medium

Regions Cut By Slashes

Count the regions that a set of slashes divides a square grid into. The visual splits each cell into four triangles and merges neighbouring triangles into groups.

Open the interactive visualisation