You are viewing a single comment's thread. Return to all comments →
Python3 solution
def removeDuplicates(self,head): slow = fast = head while fast.next: fast = fast.next if fast.data == slow.data: continue slow.next = slow = fast slow.next = None 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 →
Python3 solution