标签:删除 cat tle 存在 pytho col let code 返回
1 class Solution: 2 def deleteDuplication(self, pHead): 3 # write code here 4 Head = ListNode(-1) 5 Head.next = pHead 6 pre = Head 7 last = Head.next 8 while last: 9 if last.next and last.val == last.next.val: 10 while last.next and last.val == last.next.val: 11 last = last.next 12 pre.next = last.next 13 last = last.next 14 else: 15 pre = pre.next 16 last = pre.next 17 return Head.next
2020-01-01 16:22:31
标签:删除 cat tle 存在 pytho col let code 返回
原文地址:https://www.cnblogs.com/NPC-assange/p/12129152.html