We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5150a6b commit d07e668Copy full SHA for d07e668
Sorts/SelectionSort.java
@@ -10,10 +10,12 @@ public class SelectionSort implements SortAlgorithm {
10
11
/**
12
* This method swaps the two elements in the array
13
+ * @param <T>
14
* @param arr, i, j The array for the swap and
15
the indexes of the to-swap elements
16
*/
- public void swap(T[] arr, int i, int j) {
17
+
18
+ public <T> void swap(T[] arr, int i, int j) {
19
T temp = arr[i];
20
arr[i] = arr[j];
21
arr[j] = temp;
0 commit comments