Problem 694 · Medium

Number of Distinct Islands

Record each island as a depth-first walk from its first cell; islands with the same walk have the same shape.

Open the interactive visualisation