Format C, C++, C#, Go, Java, Python, Rust code.

This commit is contained in:
krahets
2023-09-02 23:54:38 +08:00
parent b6ac6aa7d7
commit dd72335235
53 changed files with 152 additions and 154 deletions

View File

@ -18,7 +18,7 @@ public class bucket_sort {
// 1. 将数组元素分配到各个桶中
foreach (float num in nums) {
// 输入数据范围 [0, 1),使用 num * k 映射到索引范围 [0, k-1]
int i = (int) (num * k);
int i = (int)(num * k);
// 将 num 添加进桶 i
buckets[i].Add(num);
}

View File

@ -4,7 +4,7 @@
* Author: hpstory (hpstory1024@163.com)
*/
namespace hello_algo.chapter_sorting;
namespace hello_algo.chapter_sorting;
public class heap_sort {
/* 堆的长度为 n ,从节点 i 开始,从顶至底堆化 */