Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Others/3 sum.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static void main(String args[])
else r--;
}
}


sc.close();

}
}
3 changes: 2 additions & 1 deletion Sorts/BucketSort.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Sorts;

import java.util.Random;

public class Bucket_Sort
public class BucketSort
{
static int[] sort(int[] sequence, int maxValue)
{
Expand Down
4 changes: 3 additions & 1 deletion Sorts/SelectionSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ public class SelectionSort implements SortAlgorithm {

/**
* This method swaps the two elements in the array
* @param <T>
* @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 <T> void swap(T[] arr, int i, int j) {
T temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
Expand Down