mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<p>Return the <em><strong>minimum</strong> number of moves required to make </em><code>nums</code><em> <strong>complementary</strong></em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [1,2,4,3], limit = 4
|
||||
@@ -18,7 +18,7 @@ nums[3] + nums[0] = 3 + 1 = 4.
|
||||
Therefore, nums[i] + nums[n-1-i] = 4 for every i, so nums is complementary.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [1,2,2,1], limit = 2
|
||||
@@ -26,7 +26,7 @@ Therefore, nums[i] + nums[n-1-i] = 4 for every i, so nums is complementary.
|
||||
<strong>Explanation:</strong> In 2 moves, you can change nums to [<u>2</u>,2,2,<u>2</u>]. You cannot change any number to 3 since 3 > limit.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [1,2,1,2], limit = 2
|
||||
|
Reference in New Issue
Block a user