📅  最后修改于: 2022-03-11 15:02:54.597000             🧑  作者: Mango
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;
};