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