You are viewing a single comment's thread. Return to all comments →
Python 3. My janky cringy solution
def removeDuplicates(self,head): cur= head while cur and cur.next: while cur.next and cur.data == cur.next.data: cur.next = cur.next.next cur = cur.next
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 →
Python 3. My janky cringy solution