aboutsummaryrefslogtreecommitdiff
path: root/challenge-077/ash/javascript
diff options
context:
space:
mode:
authorTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-08 09:31:16 -0700
committerTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-08 09:31:16 -0700
commitd6124e1dd1e2f11c081daf991b6000d5a1666917 (patch)
treece33d482cc3fe22e05312ea050b4a3ad221154e3 /challenge-077/ash/javascript
parentd9bd8a19492ee4633d39ca533c05511b6925aa16 (diff)
downloadperlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.tar.gz
perlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.tar.bz2
perlweeklychallenge-club-d6124e1dd1e2f11c081daf991b6000d5a1666917.zip
Task 2: improve lonely detection
First, restrict search to elements that are X (or 1 in our case), so we're not doing unnecessary work. Second, we can sum all the elements in the submatrix and if they are equal to 1, then the only 1 is the element we're checking and it is indeed surrounded by all 0s.
Diffstat (limited to 'challenge-077/ash/javascript')
0 files changed, 0 insertions, 0 deletions