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 [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