mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 03:11:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -6,14 +6,16 @@
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>arr = [2,3,4,7,11], k = 5
|
||||
<pre>
|
||||
<strong>输入:</strong>arr = [2,3,4,7,11], k = 5
|
||||
<strong>输出:</strong>9
|
||||
<strong>解释:</strong>缺失的正整数包括 [1,5,6,8,9,10,12,13,...] 。第 5 个缺失的正整数为 9 。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>arr = [1,2,3,4], k = 2
|
||||
<pre>
|
||||
<strong>输入:</strong>arr = [1,2,3,4], k = 2
|
||||
<strong>输出:</strong>6
|
||||
<strong>解释:</strong>缺失的正整数包括 [5,6,7,...] 。第 2 个缺失的正整数为 6 。
|
||||
</pre>
|
||||
@@ -28,3 +30,9 @@
|
||||
<li><code>1 <= k <= 1000</code></li>
|
||||
<li>对于所有 <code>1 <= i < j <= arr.length</code> 的 <code>i</code> 和 <code>j</code> 满足 <code>arr[i] < arr[j]</code> </li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>进阶:</strong></p>
|
||||
|
||||
<p>你可以设计一个时间复杂度小于 O(n) 的算法解决此问题吗?</p>
|
||||
|
Reference in New Issue
Block a user