BFS宽度优先搜索 class Solution { public: /** * 判断岛屿数量 * @param grid char字符型vector<vector<>> * @return int整型 */ void bfs(vector<vector<char> >& grid, int i, int j) { int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; grid[i...