Perl: the Markov chain saw | |
PerlMonks |
Re^3: Testing if an array contains a value and then deleting it in most efficient wayby ikegami (Patriarch) |
on Feb 18, 2008 at 16:37 UTC ( [id://668599]=note: print w/replies, xml ) | Need Help?? |
Fortunately for you, deleting the first (or last) element of an array (shift(@a)) is very fast (O(1)) in Perl.
In Section
Seekers of Perl Wisdom
|
|