Skip to content

Commit 44684c0

Browse files
committed
optimization bubble sort
1 parent db46929 commit 44684c0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

SortingAlgorithm/Java/BubbleSort/BubbleSort.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ public static <T> void sort(T[] a, Comparator<? super T> c) {
395395
}
396396
}
397397

398-
@SuppressWarnings({ "unchecked", "rawtypes" })
399-
private static void sort(Object[] a, int size, Comparator c) {
398+
private static <T> void sort(T[] a, int size, Comparator<? super T> c) {
400399

401400
for(int i = 1; i < size; i++) {
402401
boolean swapped = false;

0 commit comments

Comments
 (0)