删除重复的节点:
1 class Solution: 2 def deleteDuplication(self, pHead): 3 if pHead == None or pHead.next == None: 4 return pHead 5 n = pHead.next 6 if pHead.val == n.val: 7 while n and pHead.val == n.val: 8 n = n.next 9 return self.deleteDuplication(n) 10 else: 11 pHead.next = self.deleteDuplication(pHead.next) 12 return pHead 13 # write code here