Search⌘ K
AI Features

Number of Distinct Islands

Number of Distinct Islands asks you to count the unique land shapes in a binary grid, treating horizontally or vertically connected land as one island and ignoring rotations or flips.

Statement

Given an m x n binary matrix where ...