Problems? Is your data what you think it is? | |
PerlMonks |
Re: Find last position of an element in arrayby ikegami (Patriarch) |
on Mar 29, 2022 at 03:12 UTC ( [id://11142477]=note: print w/replies, xml ) | Need Help?? |
The array appears to be sorted. If that's the case, and if the array's very large, you might want to use a binary search. It would have to be larger to really benefit, though.
In Section
Seekers of Perl Wisdom
|
|