[CentOS] [OT] stable algorithm with complexity O(n)

Sat Dec 13 19:02:04 UTC 2008
David Hláčik <david at hlacik.eu>

Well, something with linear complexity O(n) which i have to prove,

Merge sort, Insertion sort or selection sort does not have O(n) complexity.

I believe that something like RadixSort, CountingSort, BucketSort
altought i am not sure

Thanks!

D.

On Sat, Dec 13, 2008 at 7:51 PM, Ignacio Vazquez-Abrams
<ivazqueznet at gmail.com> wrote:
> On Sat, 2008-12-13 at 19:24 +0100, David Hláčik wrote:
>> Hi guys,
>>
>> i am really sorry for making offtopic, hope you will not kill me, but
>> this is for me life important problem which needs to be solved within
>> next 12 hours..
>>
>> I have to create stable algorithm for sorting n numbers from interval
>> [1,n^2] with time complexity O(n) .
>>
>> Can someone please give me a hint. Would be very very thankful!
>
> Merge sort? Insertion sort? Selection sort? timsort?
>
> --
> Ignacio Vazquez-Abrams <ivazqueznet at gmail.com>
>
> PLEASE don't CC me; I'm already subscribed
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>