Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

riverSizes javascript

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;
};
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #riverSizes #javascript
ADD COMMENT
Topic
Name
8+3 =