Radix sort is one of the solution.
because this Question is in the section Radix sort in CLRS. :)

On Tue, Aug 2, 2011 at 11:10 AM, Ravinder Kumar <ravinde...@gmail.com>wrote:

> I have little thought on this :
>
> divide the whole array by n and store their remainder also in an array
> now number in original array are in range 1-n
> sort the array and when two number with same break the tie using remainder
> array
> recreate the array using remainder array .
> --
> *With Regards :*
>
> Ravinder Kumar
> B.Tech Final Year
> Computer Science and Engineering
> MNNIT Allahabad
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

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

Reply via email to