<h3><a title="题目描述" href="https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list-ii/">题目描述</a></h3>
![image.png](https://i.loli.net/2020/01/18/iyaLrvNtTfHFEKZ.png)
<h4>我的解法</h4>
<pre class="EnlighterJSRAW" data-enlighter-language="python"># Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def deleteDuplicates(self, head: ListNode) -> ListNode:
thead = ListNode('a')
thead.next = head
pre,cur = None,thead
while cur:
pre=cur
cur=cur.next
while cur and cur.next and cur.next.val == cur.val:
t=cur.val
while cur and cur.val==t:
cur=cur.next
pre.next=cur
return thead.next
</pre>
<p> </p>
<h4>Note:</h4>
<ul>
<li>杭州还是有点小冷。</li>
<li>喝了点小酒 挺晕的。</li>
<li>做链表题想到另外引入头指针。</li>
<li>2020加油!!!!</li>
</ul>
Leetcode82 删除排序链表中的重复元素 II