• + 0 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