Loading...
Engaged Employer
Remove duplicates from a linked list. O(n) time.
Anonymous
You can also keep all the values you've seen in a hash table for faster access.
Iterate over the linked list, keep a set of the seen values and remove nodes you've already seen by checking the set.
Yes, that is what I meant. I used a HashSet (Java) in my implementation.
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalized job recommendations and updates by starting your searches.