From d8289580a543e5a676437b7231e23f5970f117ec Mon Sep 17 00:00:00 2001 From: sjinzh <99076655+sjinzh@users.noreply.github.com> Date: Sun, 15 Jan 2023 20:57:01 +0800 Subject: [PATCH] update zig codes for Section 'Heap' (heap.zig) --- codes/zig/chapter_heap/heap.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/zig/chapter_heap/heap.zig b/codes/zig/chapter_heap/heap.zig index d6e8f3e05..fead5bff7 100644 --- a/codes/zig/chapter_heap/heap.zig +++ b/codes/zig/chapter_heap/heap.zig @@ -74,7 +74,7 @@ pub fn main() !void { // 输入列表并建堆 // 时间复杂度为 O(n) ,而非 O(nlogn) - try minHeap.addSlice(&[_]i32{ 1, 3, 2, 5, 4, 8, 9 }); + try minHeap.addSlice(&[_]i32{ 1, 3, 2, 5, 4 }); std.debug.print("\n输入列表并建立小顶堆后\n", .{}); try inc.PrintUtil.printHeap(i32, mem_allocator, minHeap, true);