upgrade zig codes to 0.11.0-dev.3379+629f0d23b (#563)

* upgrade zig codes to 0.11.0-dev.3379+629f0d23b

* upgrade zig codes to 0.11.0-dev.3379+629f0d23b
This commit is contained in:
sjinzh
2023-06-25 20:59:00 +08:00
committed by GitHub
parent 62e8f0df50
commit 41b7b229a3
22 changed files with 264 additions and 460 deletions

View File

@@ -28,5 +28,4 @@ pub fn main() !void {
inc.PrintUtil.printArray(i32, &nums);
_ = try std.io.getStdIn().reader().readByte();
}
}

View File

@@ -160,4 +160,4 @@ pub fn main() !void {
inc.PrintUtil.printArray(i32, &nums2);
_ = try std.io.getStdIn().reader().readByte();
}
}

View File

@@ -18,7 +18,7 @@ fn countingSortDigit(nums: []i32, exp: i32) !void {
// defer mem_arena.deinit();
const mem_allocator = mem_arena.allocator();
var counter = try mem_allocator.alloc(usize, 10);
std.mem.set(usize, counter, 0);
@memset(counter, 0);
var n = nums.len;
// 统计 0~9 各数字的出现次数
for (nums) |num| {