mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
存量题库数据更新
This commit is contained in:
@@ -20,34 +20,37 @@
|
||||
|
||||
<p>返回数组在执行某些操作之后可以拥有的 <strong>最小偏移量</strong> 。</p>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>nums = [1,2,3,4]
|
||||
<pre>
|
||||
<strong>输入:</strong>nums = [1,2,3,4]
|
||||
<strong>输出:</strong>1
|
||||
<strong>解释:</strong>你可以将数组转换为 [1,2,3,<strong>2</strong>],然后转换成 [<strong>2</strong>,2,3,2],偏移量是 3 - 2 = 1
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>nums = [4,1,5,20,3]
|
||||
<pre>
|
||||
<strong>输入:</strong>nums = [4,1,5,20,3]
|
||||
<strong>输出:</strong>3
|
||||
<strong>解释:</strong>两次操作后,你可以将数组转换为 [4,<strong>2</strong>,5,<strong>5</strong>,3],偏移量是 5 - 2 = 3
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>nums = [2,10,8]
|
||||
<pre>
|
||||
<strong>输入:</strong>nums = [2,10,8]
|
||||
<strong>输出:</strong>3
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>n == nums.length</code></li>
|
||||
<li><code>2 <= n <= 10<sup><span style="">5</span></sup></code></li>
|
||||
<li><code>2 <= n <= 5 * 10<sup><span style="font-size: 10.8333px;">4</span></sup></code></li>
|
||||
<li><code>1 <= nums[i] <= 10<sup>9</sup></code></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user