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

Commitc25b0fb

Browse files
refactor 1217
1 parent2ad95d1 commitc25b0fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/main/java/com/fishercoder/solutions/_1217.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ public static class Solution1 {
55
/**
66
* credit: https://leetcode.com/problems/play-with-chips/discuss/398239/C%2B%2B-3-lines
77
*/
8-
publicintminCostToMoveChips(int[]chips) {
8+
publicintminCostToMoveChips(int[]position) {
99
intchipsAtOddPosition =0;
1010
intchipsAtEvenPosition =0;
11-
for (inti =0;i <chips.length;i++) {
12-
if (chips[i] %2 ==0) {
11+
for (inti =0;i <position.length;i++) {
12+
if (position[i] %2 ==0) {
1313
chipsAtEvenPosition++;
1414
}else {
1515
chipsAtOddPosition++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp