1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/移除重复节点 [remove-duplicate-node-lcci].html

27 lines
596 B
HTML
Raw Normal View History

2022-03-27 20:38:29 +08:00
<p>编写代码,移除未排序链表中的重复节点。保留最开始出现的节点。</p>
<p> <strong>示例1:</strong></p>
<pre>
<strong> 输入</strong>[1, 2, 3, 3, 2, 1]
<strong> 输出</strong>[1, 2, 3]
</pre>
<p> <strong>示例2:</strong></p>
<pre>
<strong> 输入</strong>[1, 1, 1, 1, 2]
<strong> 输出</strong>[1, 2]
</pre>
<p><strong>提示:</strong></p>
<ol>
<li>链表长度在[0, 20000]范围内。</li>
<li>链表元素在[0, 20000]范围内。</li>
</ol>
<p> <strong>进阶:</strong></p>
<p>如果不得使用临时缓冲区,该怎么解决?</p>