Which three islands are in example 2?


  • 0
    L

    Given to the description

    An island is surrounded by water AND is formed by connecting adjacent lands horizontally or vertically

    I only see two islands in the lower right corner, where's the other one?


  • 0

    How did you see those two islands but overlooked the largest island? It's in the top left.


  • 0
    L

    Oh, I see! Didn't realize that islands consist of multiple 1's


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.