We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b5314 commit 8fe955fCopy full SHA for 8fe955f
src/main/java/com/fishercoder/solutions/secondthousand/_1509.java
@@ -14,7 +14,7 @@ public int minDifference(int[] nums) {
14
int minDiff = Math.abs(nums[len - 4] - nums[0]);
15
16
//now try to change the three smallest to biggest
17
- minDiff = Math.min(minDiff, nums[len -1] - nums[3]);
+ minDiff = Math.min(minDiff, nums[len - 1] - nums[3]);
18
19
//now try to change first two and last one
20
minDiff = Math.min(minDiff, nums[len - 2] - nums[2]);
0 commit comments