Skip to content

Commit 1ec6067

Browse files
refactor 1551
1 parent 9f172fa commit 1ec6067

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/fishercoder/solutions/_1551.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ public static class Solution1 {
55
public int minOperations(int n) {
66
int min = 1;
77
int max = 2 * (n - 1) + 1;
8-
int finalNumber = (max + min) / 2;
8+
int equalNumber = (max + min) / 2;
99
int ops = 0;
1010
for (int i = 0; i < n / 2; i++) {
11-
ops += finalNumber - (2 * i + 1);
11+
ops += equalNumber - (2 * i + 1);
1212
}
1313
return ops;
1414
}

0 commit comments

Comments
 (0)