Remove duplicate elements: Difference between revisions
m
→ATS2 implementation using a radix sort
Line 657:
=== ATS2 implementation using a radix sort ===
This method runs in O(nw) time, where n is the number of elements n and w is a factor that is constant for
The implementation is for unsigned integers and puts the unique numbers into a second array in ascending order.
Radix sorting can sort an array of elements only into the encoding order of their keys, but that is a common case. Here the only reason to sort at all is to quickly eliminate duplicates.
|