diff options
| author | James Smith <js5@sanger.ac.uk> | 2022-03-20 22:39:56 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-20 22:39:56 +0000 |
| commit | 982abdcdd668e3f50cdd73636f7d747559b89fef (patch) | |
| tree | 7a06c58f74958cf12a12503b25d5f98141dad275 /challenge-152 | |
| parent | c52253335fb29db08b94c7175da1c041b2f2107b (diff) | |
| download | perlweeklychallenge-club-982abdcdd668e3f50cdd73636f7d747559b89fef.tar.gz perlweeklychallenge-club-982abdcdd668e3f50cdd73636f7d747559b89fef.tar.bz2 perlweeklychallenge-club-982abdcdd668e3f50cdd73636f7d747559b89fef.zip | |
Update README.md
Diffstat (limited to 'challenge-152')
| -rw-r--r-- | challenge-152/james-smith/README.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-152/james-smith/README.md b/challenge-152/james-smith/README.md index c4e88353c8..7281059d1d 100644 --- a/challenge-152/james-smith/README.md +++ b/challenge-152/james-smith/README.md @@ -93,7 +93,7 @@ sub min_path_anydir_sort { $res; } -sub min_path_anydir_stot { +sub min_path_anydir_sort { my $res=0; $res += [sort {$a<=>$b} @{$_}]->[0] for @{$_[0]}; $res; @@ -130,7 +130,7 @@ So we can compute 3 heights: We do similarly for the 3 widths. -Then the area is `w1*12 + w2*h2` and if there is an itersection *i.e.* both w3 & h3 are positive - we subtract `w3*h3`. +Then the area is `w1*h1 + w2*h2` and if there is an itersection *i.e.* both w3 & h3 are positive - we subtract `w3*h3`. This gives us the solution: |
