Leetcode #Java # Number of Islands #day17

    Leetcode[day17] - Number of Islands

    Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: 11110 11010 11000 00000 Output: 1 1. 알고리즘을 해결하기 위해서 생각한 방법 - 우선, 문제를 이해하는데 시간이 좀 걸렸다. - 해당 문제는 0이 물이고, 1이 땅이라고 할 때, 이어진 1이 ..