Skip to content

Commit 7bc5b85

Browse files
author
alxklm
committed
checkstyle: fix formatting
1 parent ed7a199 commit 7bc5b85

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/java/com/thealgorithms/sorts/RadixSort.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.thealgorithms.sorts;
22

33
import com.thealgorithms.maths.NumberOfDigits;
4-
54
import java.util.Arrays;
65

76
/**
@@ -25,7 +24,7 @@ public static int[] sort(int[] array) {
2524
return array;
2625
}
2726

28-
int[] negatives = Arrays.stream(array).filter(x -> x < 0).map(x -> -x).toArray();
27+
int[] negatives = Arrays.stream(array).filter(x -> x < 0).map(x -> - x).toArray();
2928
int[] positives = Arrays.stream(array).filter(x -> x >= 0).toArray();
3029

3130
if (negatives.length > 0) {

src/test/java/com/thealgorithms/sorts/RadixSortTest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ private static Stream<Arguments> provideTestCases() {
1919
Arguments.of(new int[] {10, 90, 49, 2, 1, 5, 23}, new int[] {1, 2, 5, 10, 23, 49, 90}), Arguments.of(new int[] {1, 3, 4, 2, 7, 8}, new int[] {1, 2, 3, 4, 7, 8}), Arguments.of(new int[] {}, new int[] {}), Arguments.of(new int[] {1}, new int[] {1}),
2020
Arguments.of(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9}, new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9}), Arguments.of(new int[] {9, 8, 7, 6, 5, 4, 3, 2, 1}, new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9}),
2121
Arguments.of(new int[] {1000000000, 999999999, 888888888, 777777777}, new int[] {777777777, 888888888, 999999999, 1000000000}), Arguments.of(new int[] {123, 9, 54321, 123456789, 0}, new int[] {0, 9, 123, 54321, 123456789}),
22-
Arguments.of(new int[] {-170, 45, -75, 90, -802, 24, -2, 66}, new int[] {-802, -170, -75, -2, 24, 45, 66, 90}), Arguments.of(new int[] {-3, -3, -3, -3}, new int[] {-3, -3, -3, -3}),
23-
Arguments.of(new int[] {-9, -4, -6, -8, -14, -3}, new int[] {-14, -9, -8, -6, -4, -3}), Arguments.of(new int[] {10, -90, 49, -2, 1, -5, 23}, new int[] {-90, -5, -2, 1, 10, 23, 49}),
24-
Arguments.of(new int[] {-1, -3, -4, -2, -7, -8}, new int[] {-8, -7, -4, -3, -2, -1}), Arguments.of(new int[] {1, -1, 0, -100, 100}, new int[] {-100, -1, 0, 1, 100}),
22+
Arguments.of(new int[] {-170, 45, -75, 90, -802, 24, -2, 66}, new int[] {-802, -170, -75, -2, 24, 45, 66, 90}), Arguments.of(new int[] {-3, -3, -3, -3}, new int[] {-3, -3, -3, -3}), Arguments.of(new int[] {-9, -4, -6, -8, -14, -3}, new int[] {-14, -9, -8, -6, -4, -3}),
23+
Arguments.of(new int[] {10, -90, 49, -2, 1, -5, 23}, new int[] {-90, -5, -2, 1, 10, 23, 49}), Arguments.of(new int[] {-1, -3, -4, -2, -7, -8}, new int[] {-8, -7, -4, -3, -2, -1}), Arguments.of(new int[] {1, -1, 0, -100, 100}, new int[] {-100, -1, 0, 1, 100}),
2524
Arguments.of(new int[] {-1000000000, 999999999, -888888888, 777777777}, new int[] {-1000000000, -888888888, 777777777, 999999999}), Arguments.of(new int[] {-123, 9, -54321, 123456789, 0}, new int[] {-54321, -123, 0, 9, 123456789}));
2625
}
2726
}

0 commit comments

Comments
 (0)