Skip to content

Commit c25b0fb

Browse files
refactor 1217
1 parent 2ad95d1 commit c25b0fb

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-
public int minCostToMoveChips(int[] chips) {
8+
public int minCostToMoveChips(int[] position) {
99
int chipsAtOddPosition = 0;
1010
int chipsAtEvenPosition = 0;
11-
for (int i = 0; i < chips.length; i++) {
12-
if (chips[i] % 2 == 0) {
11+
for (int i = 0; i < position.length; i++) {
12+
if (position[i] % 2 == 0) {
1313
chipsAtEvenPosition++;
1414
} else {
1515
chipsAtOddPosition++;

0 commit comments

Comments
 (0)