mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-23 22:40:25 +08:00
update zig codes for Section 'Heap' (heap.zig)
This commit is contained in:
parent
5e17778f69
commit
d8289580a5
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user