aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Muth <matthias.muth@gmx.de>2025-10-31 17:03:58 +0100
committerMatthias Muth <matthias.muth@gmx.de>2025-10-31 17:03:58 +0100
commit9a264abb1aec628fe6d36956af9828d24dfb264d (patch)
tree116b2fedd2a5ff5f8d41c497426dc1e6675cbc11
parent652709ce9b248c726fb2a92d27a71d862c110962 (diff)
downloadperlweeklychallenge-club-9a264abb1aec628fe6d36956af9828d24dfb264d.tar.gz
perlweeklychallenge-club-9a264abb1aec628fe6d36956af9828d24dfb264d.tar.bz2
perlweeklychallenge-club-9a264abb1aec628fe6d36956af9828d24dfb264d.zip
Challenge 345 Task 1 and 2 solutions in Perl by Matthias Muth - Update
-rwxr-xr-xchallenge-345/matthias-muth/perl/ch-1.pl7
1 files changed, 0 insertions, 7 deletions
diff --git a/challenge-345/matthias-muth/perl/ch-1.pl b/challenge-345/matthias-muth/perl/ch-1.pl
index 15057cca5f..5d71a73cbd 100755
--- a/challenge-345/matthias-muth/perl/ch-1.pl
+++ b/challenge-345/matthias-muth/perl/ch-1.pl
@@ -14,13 +14,6 @@ use feature 'signatures';
no warnings 'experimental::signatures';
sub peak_positions( @ints ) {
- return grep {
- ( $_ == 0 || $ints[$_] > $ints[ $_ - 1 ] )
- && ( $_ == $#ints || $ints[$_] > $ints[ $_ + 1 ] )
- } keys @ints;
-}
-
-sub peak_positions( @ints ) {
my @ridge = ( 0, @ints, 0 );
return grep $ridge[$_] < $ridge[ $_ + 1 ] > $ridge[ $_ + 2 ], keys @ints;
}