Skip to content

Commit 0c43428

Browse files
authored
Merge pull request #1354 from thecoderenroute/master
Fixing errors and warnings
2 parents 4b42784 + d07e668 commit 0c43428

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Others/3 sum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public static void main(String args[])
5353
else r--;
5454
}
5555
}
56-
5756

57+
sc.close();
5858

5959
}
6060
}

Sorts/BucketSort.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
package Sorts;
12

23
import java.util.Random;
34

4-
public class Bucket_Sort
5+
public class BucketSort
56
{
67
static int[] sort(int[] sequence, int maxValue)
78
{

Sorts/SelectionSort.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ public class SelectionSort implements SortAlgorithm {
1010

1111
/**
1212
* This method swaps the two elements in the array
13+
* @param <T>
1314
* @param arr, i, j The array for the swap and
1415
the indexes of the to-swap elements
1516
*/
16-
public void swap(T[] arr, int i, int j) {
17+
18+
public <T> void swap(T[] arr, int i, int j) {
1719
T temp = arr[i];
1820
arr[i] = arr[j];
1921
arr[j] = temp;

0 commit comments

Comments
 (0)