Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^4: Find Length Of Longest Ascending/Descending Sequenceby wind (Priest) |
on May 09, 2011 at 21:57 UTC ( [id://903844]=note: print w/replies, xml ) | Need Help?? |
The result is 1 more than the length of the longest capture. Why? If the full string is "123", then the result should be 3. If it's "21234", then the result should be 4. Still need to take overlaps into account even if you just want the length. Btw, still have the typo in your last bit of code where you use min instead of max.
In Section
Seekers of Perl Wisdom
|
|