mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-27 00:56:29 +08:00
build
This commit is contained in:
parent
9253328b55
commit
43c3bc8838
2 changed files with 21 additions and 21 deletions
|
@ -23,7 +23,7 @@ comments: true
|
|||
```java title="bucket_sort.java"
|
||||
/* 桶排序 */
|
||||
void bucketSort(float[] nums) {
|
||||
// 初始化 k = n/3 个桶,预期向每个桶分配 3 个元素
|
||||
// 初始化 k = n/2 个桶,预期向每个桶分配 2 个元素
|
||||
int k = nums.length / 2;
|
||||
List<List<Float>> buckets = new ArrayList<>();
|
||||
for (int i = 0; i < k; i++) {
|
||||
|
|
Loading…
Reference in a new issue