Why add a duplicate position will count as a new island?


  • 0
    S

    E.g.
    3
    3
    [[0,0],[0,1],[1,2],[2,1], [1,1], [1,1], [1,1], [1,1], [1,2]]

    I don't understand why adding duplicate island (1,1) will cause the islands count to grow?


Log in to reply
 

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