We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
def removeDuplicates(self,head):
d = {}
cur = n = head
while n is not None:
if n.data not in d.keys():
d[n.data] = True
cur = n
else:
cur.next = n.next
n = n.next
return head
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 24: More Linked Lists
You are viewing a single comment's thread. Return to all comments →
My solution in Python 3 using dictionary