1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-11 10:21:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

批量更新数据

This commit is contained in:
2025-01-09 20:29:41 +08:00
parent 04ecea043d
commit 48cdd06c2b
5053 changed files with 156164 additions and 135322 deletions

View File

@@ -1,6 +1,6 @@
<p>You are given a <strong>0-indexed</strong> integer array <code>nums</code> of <strong>even</strong> length consisting of an <strong>equal</strong> number of positive and negative integers.</p>
<p>You should <strong>rearrange</strong> the elements of <code>nums</code> such that the modified array follows the given conditions:</p>
<p>You should return the array of nums such that the the array follows the given conditions:</p>
<ol>
<li>Every <strong>consecutive pair</strong> of integers have <strong>opposite signs</strong>.</li>
@@ -41,3 +41,6 @@ So nums is rearranged to [1,-1].
<li><code>1 &lt;= |nums[i]| &lt;= 10<sup>5</sup></code></li>
<li><code>nums</code> consists of <strong>equal</strong> number of positive and negative integers.</li>
</ul>
<p>&nbsp;</p>
It is not required to do the modifications in-place.