DEV Community

Perl Weekly Challenge #235 - Splicing and Dicing

oldtechaa on September 23, 2023

Hi everybody, we've got another two challenges this week, so let's dive into them! Remove One The goal is to see if there's any one num...
Collapse
 
packy profile image
Packy Anderson

Your task 1 solution produces the correct results when there are 1 or more removals needed to produce a strictly increasing sequence, but it produces an incorrect result (true) when there are NO removals needed (because if the sequence is already strictly increasing, removing any one of the values will still leave the sequence strictly increasing).

Collapse
 
oldtechaa profile image
oldtechaa

I can see that interpretation, however technically it exactly meets the specifications of the challenge. The challenge is whether it's possible to get an increasing list of integers with no more than one removal, not whether a removal is actually needed.

Collapse
 
packy profile image
Packy Anderson

I guess I see that interpretation.