If you are willing to leave out some space,hashing will do. For sorting merge sort may be the best for linked list.For an implemenatation check here http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html <http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html>(Quick sort won't work bcoz element cant be partitioned in o(1))
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. > -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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.