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

27 lines
596 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>