You are viewing a single comment's thread. Return to all comments →
Simplest Py3 solution:
def removeDuplicates(self,head): if head is None: return head start = head curr = head while curr.next is not None: if curr.next.data == curr.data: curr.next = curr.next.next else: curr = curr.next return start
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 →
Simplest Py3 solution: