Skip to content

Commit f6ccaac

Browse files
committed
docs: update description to lc problem No.0283
No.0283.Move Zeroes
1 parent 33dc936 commit f6ccaac

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

solution/0200-0299/0283.Move Zeroes/README.md

+28-8
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,37 @@
88

99
<p>给定一个数组 <code>nums</code>,编写一个函数将所有 <code>0</code> 移动到数组的末尾,同时保持非零元素的相对顺序。</p>
1010

11-
<p><strong>示例:</strong></p>
11+
<p><strong>请注意</strong>&nbsp;,必须在不复制数组的情况下原地对数组进行操作。</p>
1212

13-
<pre><strong>输入:</strong> <code>[0,1,0,3,12]</code>
14-
<strong>输出:</strong> <code>[1,3,12,0,0]</code></pre>
13+
<p>&nbsp;</p>
1514

16-
<p><strong>说明</strong>:</p>
15+
<p><strong>示例 1:</strong></p>
1716

18-
<ol>
19-
<li>必须在原数组上操作,不能拷贝额外的数组。</li>
20-
<li>尽量减少操作次数。</li>
21-
</ol>
17+
<pre>
18+
<strong>输入:</strong> nums = [0,1,0,3,12]
19+
<strong>输出:</strong> [1,3,12,0,0]
20+
</pre>
21+
22+
<p><strong>示例 2:</strong></p>
23+
24+
<pre>
25+
<strong>输入:</strong> nums = [0]
26+
<strong>输出:</strong> [0]
27+
</pre>
28+
29+
<p>&nbsp;</p>
30+
31+
<p><strong>提示</strong>:</p>
32+
<meta charset=\"UTF-8\" />
33+
34+
<ul>
35+
<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
36+
<li><code>-2<sup>31</sup>&nbsp;&lt;= nums[i] &lt;= 2<sup>31</sup>&nbsp;- 1</code></li>
37+
</ul>
38+
39+
<p>&nbsp;</p>
40+
41+
<p><b>进阶:</b>你能尽量减少完成的操作次数吗?</p>
2242

2343
## 解法
2444

0 commit comments

Comments
 (0)