diff --git a/Others/3 sum.java b/Others/3 sum.java index 577044aab..5723ba49c 100644 --- a/Others/3 sum.java +++ b/Others/3 sum.java @@ -53,8 +53,8 @@ class threesum{ else r--; } } - + sc.close(); } } \ No newline at end of file diff --git a/Sorts/BucketSort.java b/Sorts/BucketSort.java index 7556faf57..1d2e94ff2 100644 --- a/Sorts/BucketSort.java +++ b/Sorts/BucketSort.java @@ -1,7 +1,8 @@ +package Sorts; import java.util.Random; -public class Bucket_Sort +public class BucketSort { static int[] sort(int[] sequence, int maxValue) { diff --git a/Sorts/SelectionSort.java b/Sorts/SelectionSort.java index e6b7c8833..31b16c5bb 100644 --- a/Sorts/SelectionSort.java +++ b/Sorts/SelectionSort.java @@ -10,10 +10,12 @@ public class SelectionSort implements SortAlgorithm { /** * This method swaps the two elements in the array + * @param * @param arr, i, j The array for the swap and the indexes of the to-swap elements */ - public void swap(T[] arr, int i, int j) { + + public void swap(T[] arr, int i, int j) { T temp = arr[i]; arr[i] = arr[j]; arr[j] = temp;