Hi,
How can we sort one unsorted int array with O(n).
Unsorted : {4,2,6,1,5,5,1,2,45,444,44,45,4,1}
Sorted : {1,1,1,2,2,4,4,5,5,6,44,45,45,444}
Is there any sorting method which gives us O(n) time complexity???
Please tell the algo if anybody knows it.
--
AMAN AGARWAL
Success is not final,
Counting sort, radix sort, .
On Wed, Aug 3, 2011 at 10:58 AM, AMAN AGARWAL mnnit.a...@gmail.com wrote:
Hi,
How can we sort one unsorted int array with O(n).
Unsorted : {4,2,6,1,5,5,1,2,45,444,44,45,4,1}
Sorted : {1,1,1,2,2,4,4,5,5,6,44,45,45,444}
Is there any sorting method which
counting sort
http://en.wikipedia.org/wiki/Counting_sort
Thanks
NItin
On Wed, Aug 3, 2011 at 10:58 AM, AMAN AGARWAL mnnit.a...@gmail.com wrote:
Hi,
How can we sort one unsorted int array with O(n).
Unsorted : {4,2,6,1,5,5,1,2,45,444,44,45,4,1}
Sorted : {1,1,1,2,2,4,4,5,5,6,44,45,45,444}