diff options
| -rwxr-xr-x | challenge-345/matthias-muth/perl/ch-1.pl | 7 |
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; } |
