counting sort ll help to some extent... find the min and max element O(n)
now u just need an array of size  "max-min" to store the values.... then
just traverse the list and while updating u do value+min... still it is not
suitable if the magnitude is high.....

On Sat, Jul 23, 2011 at 9:45 AM, Ankur Khurana <ankur.kkhur...@gmail.com>wrote:

> n logn merge sort.................count sort only when range is known.....
>
>
> On Sat, Jul 23, 2011 at 1:35 AM, sunny agrawal <sunny816.i...@gmail.com>wrote:
>
>> Cannot be done in O(N) if elements of list can take any value because then
>> counting sort wont help
>>
>> On Sat, Jul 23, 2011 at 1:24 AM, Pankaj <jatka.oppimi...@gmail.com>wrote:
>>
>>> For linklist? How
>>>
>>>
>>> On Sat, Jul 23, 2011 at 1:23 AM, Kamakshii Aggarwal <
>>> kamakshi...@gmail.com> wrote:
>>>
>>>> use counting sort..
>>>>
>>>>
>>>> On Sat, Jul 23, 2011 at 1:22 AM, rShetty <rajeevr...@gmail.com> wrote:
>>>>
>>>>> How to sort Linked lists in O(n) time ??
>>>>> Give the algorithm or the explanation or clue to tackle the problem
>>>>>
>>>>> --
>>>>> 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.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Kamakshi
>>>> kamakshi...@gmail.com
>>>>
>>>>  --
>>>> 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.
>>>>
>>>
>>>  --
>>> 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.
>>
>
>
>
> --
> Ankur Khurana
> Computer Science
> Netaji Subhas Institute Of Technology
> Delhi.
>
>  --
> 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.
>

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