Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Write a code to remove duplicates from an unsorted Linked List in c#.net
Posted

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
its pretty easy - why dont you make a start, post what you've done here, and ask us a specific question

here's enough to get you started (its only one way out of oodles of possibilities)

a) traverse/iterate your source/duplicate/unsorted list, for all elements in the list
b) for any element, check a suitable data structure to see if the element exists
c) for any element that exists, maybe add one to the count for that item, else, insert the element with a count of '1'
d) when you're finished traversing your source/duplicate/unsorted list, if you chose the correct data structure at (b), you then have a list of unique entries, and counts for those entries of how many times they were seen (sometimes useful)

'g'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900