📜  RiverSizes javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:54.597000             🧑  作者: Mango

代码示例1
const riverSizes = input => {
  let results = [];
  input.forEach((row, y) => {
    row.forEach((cell, x) => {
      if (input[y][x] === 1) {
        results.push(checkAdjacent(x, y, input));
      }
    });
  });
  return results;
};