
14 Mar
2007
14 Mar
'07
4:07 a.m.
"Neil Mitchell"
nub will be O(#in * #out). Sort will be O(#in log #in). Where #out is much smaller than log #in, nub will win.
This can be remedied by having (quick)sort partitioning in three groups (less than, equal to, and greater than the pivot). I think I argued that this should be the default, since it reduces a category of bad-case behaviours. -k -- If I haven't seen further, it is by standing in the footprints of giants