Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Create unique array --the hard way!by hdb (Monsignor) |
on Mar 07, 2014 at 19:00 UTC ( [id://1077442]=note: print w/replies, xml ) | Need Help?? |
How about losing the duplicates while sorting? Here is the quicksort implementation from Rosetta Code:
(This is for sorting numbers.) If you now replace >= with > so you get
you will get a sorted array without duplicates.
In Section
Seekers of Perl Wisdom
|
|