From 9a264abb1aec628fe6d36956af9828d24dfb264d Mon Sep 17 00:00:00 2001 From: Matthias Muth Date: Fri, 31 Oct 2025 17:03:58 +0100 Subject: Challenge 345 Task 1 and 2 solutions in Perl by Matthias Muth - Update --- challenge-345/matthias-muth/perl/ch-1.pl | 7 ------- 1 file changed, 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 @@ -13,13 +13,6 @@ use warnings; 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; -- cgit