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 8221b49 commit 403543eCopy full SHA for 403543e
src/main/java/com/fishercoder/solutions/_1200.java
@@ -44,11 +44,11 @@ public List<List<Integer>> minimumAbsDifference(int[] arr) {
44
for (int i = 1; i < arr.length - 1; i++) {
45
int diff = arr[i + 1] - arr[i];
46
if (minimumDiff == diff) {
47
- result.add(Arrays.asList(arr[i], arr[i+1]));
+ result.add(Arrays.asList(arr[i], arr[i + 1]));
48
} else if (minimumDiff > diff) {
49
minimumDiff = diff;
50
result = new ArrayList();
51
52
}
53
54
return result;
0 commit comments