Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f9c720

Browse files
committed
283 (2) add comments
1 parentc1f8b83 commit5f9c720

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/_283_MoveZeroes/Solution.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
/** see test {@link _283_MoveZeroes.SolutionTest } */
2424
publicclassSolution {
2525

26+
// x, x, x, 0, 0, 0, y => x, x, x, y, 0, 0, 0
27+
// j i j
28+
// swap nums[i] with nums[j]
2629
publicvoidmoveZeroes(int[]nums) {
2730
intj = -1;// index of first 0 in array
2831
for (inti =0;i <nums.length;i++) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp