@Ankur: Use a radix sort with radix n. It will take 3 passes to sort
the 3 base-n digits, each of O(n), so the overall order will be O(n).

On Aug 14, 10:08 am, Ankur Garg <[email protected]> wrote:
> This is one question from Coreman
>
> 3rd Edition -
>
> 8-3-4 --  Sort n integers in the range 0 to n^3 -1 in O(n) time
>
> Any ideas how to do this in O(n)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to