agree with saurabh.....merge sort will be the best.....using sorting problem
can be solved in O(nlogn)
else use hashing to solve in O(n)

@shady.....ya that would be most obvious solution can be done easily in
O(n^2).

On Wed, Jul 13, 2011 at 8:36 PM, shady <[email protected]> wrote:

> what are the constraints ?
> if none then it could be done easily. O(N^2) solution
>
> On Wed, Jul 13, 2011 at 8:10 PM, Anika Jain <[email protected]>wrote:
>
>> how to remove duplicates from a linked list?? is it mandatory to sort the
>> list first?l
>>
>> --
>> 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.
>>
>
>  --
> 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.
>

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