:type head: ListNode :rtype: ListNode
(self, head)
| 32 | |
| 33 | class Solution(object): |
| 34 | def deleteDuplicates(self, head): |
| 35 | """ |
| 36 | :type head: ListNode |
| 37 | :rtype: ListNode |
| 38 | """ |
| 39 | if not head: |
| 40 | return head |
| 41 | |
| 42 | x = head |
| 43 | |
| 44 | while head.next: |
| 45 | if head.val == head.next.val: |
| 46 | head.next = head.next.next |
| 47 | else: |
| 48 | head = head.next |
| 49 | |
| 50 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected