You are viewing a single comment's thread. Return to all comments →
#python def removeDuplicates(self, head): if not head: return res=set() current=head while current.next: res.add(current.data) current=current.next res.add(current.data) head=None for x in list(sorted(res)): head=self.insert(head, x) return head
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 →