mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 02:04:31 +08:00
Update Sorts/BucketSort.java
This commit is contained in:
@ -50,7 +50,7 @@ public class BucketSort {
|
||||
|
||||
/* store elements to buckets */
|
||||
for (int value : arr) {
|
||||
int hash = hash(value, max, numberOfBuckets);
|
||||
int hash = hash(value, min, numberOfBuckets);
|
||||
buckets.get(hash).add(value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user