mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-26 22:14:08 +08:00
fix: removed warning for Sorts 'C-style array declaration of parameter 'array''
This commit is contained in:
@ -33,7 +33,7 @@ class CombSort implements SortAlgorithm {
|
||||
* @return sorted array
|
||||
*/
|
||||
@Override
|
||||
public <T extends Comparable<T>> T[] sort(T arr[]) {
|
||||
public <T extends Comparable<T>> T[] sort(T[] arr) {
|
||||
int size = arr.length;
|
||||
|
||||
// initialize gap
|
||||
@ -62,9 +62,9 @@ class CombSort implements SortAlgorithm {
|
||||
}
|
||||
|
||||
// Driver method
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
CombSort ob = new CombSort();
|
||||
Integer arr[] = {8, 4, 1, 56, 3, -44, -1, 0, 36, 34, 8, 12, -66, -78, 23, -6, 28, 0};
|
||||
Integer[] arr = {8, 4, 1, 56, 3, -44, -1, 0, 36, 34, 8, 12, -66, -78, 23, -6, 28, 0};
|
||||
ob.sort(arr);
|
||||
|
||||
System.out.println("sorted array");
|
||||
|
Reference in New Issue
Block a user