message: Update number-of-islands.cpp
diff: @@ -133,10 +133,9 @@ private:
  return false;
  }
  (*grid)[i][j] = '0';
  - vector<pair<int, int>> q = {{i, j}};
  + queue<pair<int, int>> q({{i, j}});
  while (!q.empty()) {
  - vector<pair<int, int>> new_q;
  - for (const auto& [r, c] : q) {
  + const auto [r, c] = q.front(); q.pop();
  for (const auto& d : directions) {
  const auto nr = r + d.first;
  const auto nc = c + d.second;
  @@ -146,11 +145,9 @@ private:
  continue;
  }
  (*grid)[nr][nc] = '0';
  - new_q.emplace_back(nr, nc);
  + q.emplace(nr, nc);
  }
  }
  - q = move(new_q);
  - }
  return true;
  }
  };
  