We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f172fa commit 1ec6067Copy full SHA for 1ec6067
src/main/java/com/fishercoder/solutions/_1551.java
@@ -5,10 +5,10 @@ public static class Solution1 {
5
public int minOperations(int n) {
6
int min = 1;
7
int max = 2 * (n - 1) + 1;
8
- int finalNumber = (max + min) / 2;
+ int equalNumber = (max + min) / 2;
9
int ops = 0;
10
for (int i = 0; i < n / 2; i++) {
11
- ops += finalNumber - (2 * i + 1);
+ ops += equalNumber - (2 * i + 1);
12
}
13
return ops;
14
0 commit comments