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 <sinv...@gmail.com> 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 <anika.jai...@gmail.com>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 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.
>

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