mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 17:56:02 +08:00
Create BucketSortTest (#3779)
* Create BucketSortTest * Update src/test/java/com/thealgorithms/sorts/BucketSortTest.java Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com> Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
This commit is contained in:
@ -32,7 +32,7 @@ public class BucketSort {
|
||||
*
|
||||
* @param arr the array contains elements
|
||||
*/
|
||||
private static void bucketSort(int[] arr) {
|
||||
public static int[] bucketSort(int[] arr) {
|
||||
/* get max value of arr */
|
||||
int max = max(arr);
|
||||
|
||||
@ -67,6 +67,8 @@ public class BucketSort {
|
||||
arr[index++] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user