Problem 694 · Medium
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