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)/寻找文件副本 [shu-zu-zhong-zhong-fu-de-shu-zi-lcof].html
2023-12-09 18:53:53 +08:00

22 lines
568 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>设备中存有 <code>n</code> 个文件,文件 <code>id</code> 记于数组 <code>documents</code>。若文件 <code>id</code> 相同,则定义为该文件存在副本。请返回任一存在副本的文件 <code>id</code></p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>documents = [2, 5, 3, 0, 5, 0]
<strong>输出:</strong>0 或 5
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 ≤ documents[i] ≤ n-1</code></li>
<li><code>2 &lt;= n &lt;= 100000</code></li>
</ul>
<p>&nbsp;</p>