update zig codes for Section 'Heap' (heap.zig)

This commit is contained in:
sjinzh
2023-01-16 05:30:46 +08:00
parent 87949f6c20
commit 58d5c117f8
3 changed files with 7 additions and 8 deletions

View File

@ -65,7 +65,7 @@ pub fn printHeap(comptime T: type, mem_allocator: std.mem.Allocator, queue: anyt
std.debug.print("堆的数组表示:", .{});
printArray(T, arr[0..len]);
std.debug.print("\n堆的树状表示:\n", .{});
var root = try TreeUtil.arrQueToTree(T, mem_allocator, arr[0..len]); // through TailQueue
var root = try TreeUtil.arrToTree(T, mem_allocator, arr[0..len]); // through TailQueue
try printTree(root, null, false);
}