This commit is contained in:
krahets
2023-06-25 21:11:35 +08:00
parent 5bc8df6d5d
commit e4e6cd6bae
19 changed files with 836 additions and 105 deletions

View File

@@ -535,7 +535,7 @@ $$
// 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| {