Skip to content

Fixing errors and warnings #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2020
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