On Wed, Mar 24, 2010 at 7:43 PM, Nagy Gabor <ng...@bibl.u-szeged.hu> wrote: >> I was going to use alpm_list_remove_dups instead of testing for a >> strings presence before adding it but I find that function quite >> impractical... >> >> I wonder if any other frontend is using it and whether we could change >> it to actually removing the duplicates from a list. i.e. return the >> same list with duplicates removed and their data freed. Or am I >> missing some usage case where the current functionality is useful? >> >> Allan > > Just a sidenote: remove_dup could be done in O(n) time, when the list is > sorted. :-) >
Right. Or we could kill remove_dup and make a variant of msort that does not keep duplicate. hmmm