Skip to content

Commit 8e0a429

Browse files
Merge pull request #331 from ackFinding/master
Update BucketSort.java
2 parents 23c3502 + d438d07 commit 8e0a429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/13_sorts/BucketSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class BucketSort {
1414
* @param bucketSize 桶容量
1515
*/
1616
public static void bucketSort(int[] arr, int bucketSize) {
17-
if (arr.length == 0) {
17+
if (arr.length < 2) {
1818
return;
1919
}
2020

0 commit comments

Comments
 (0)