private void findIsland(int i, int j, char[][] grid) {
        grid[i][j] = '0';
        if (i - 1 >= 0 && grid[i - 1][j] == '1')
                findIsland(i - 1, j, grid);
        if (j - 1 >= 0 && grid[i][j - 1] == '1')
                findIsland(i, j - 1, grid);
        if (j + 1 < grid[0].length && grid[i][j + 1] == '1')
                findIsland(i, j + 1, grid);
        if (i + 1 < grid.length && grid[i + 1][j] == '1')
                findIsland(i + 1, j, grid);
    }