mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-11 10:21:43 +08:00
批量更新数据
This commit is contained in:
@@ -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 <= |nums[i]| <= 10<sup>5</sup></code></li>
|
||||
<li><code>nums</code> consists of <strong>equal</strong> number of positive and negative integers.</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
It is not required to do the modifications in-place.
|
Reference in New Issue
Block a user