You are viewing a single comment's thread. Return to all comments →
def removeDuplicates(llist): # Write your code here slow = llist fast = slow.next
while fast: if slow.data == fast.data: fast = fast.next slow.next = fast continue slow = fast fast = fast.next return llist
Seems like cookies are disabled on this browser, please enable them to open this website
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
def removeDuplicates(llist): # Write your code here slow = llist fast = slow.next