diff --git a/Sorts/BucketSort.java b/Sorts/BucketSort.java index 5f5678919..0ff4a92ec 100644 --- a/Sorts/BucketSort.java +++ b/Sorts/BucketSort.java @@ -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); } @@ -112,4 +112,4 @@ public class BucketSort { } return min; } -} \ No newline at end of file +}