mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 06:07:20 +08:00 
			
		
		
		
	update zig codes for Section 'Heap' (heap.zig)
This commit is contained in:
		@ -65,7 +65,7 @@ pub fn printHeap(comptime T: type, mem_allocator: std.mem.Allocator, queue: anyt
 | 
				
			|||||||
    std.debug.print("堆的数组表示:", .{});
 | 
					    std.debug.print("堆的数组表示:", .{});
 | 
				
			||||||
    printArray(T, arr[0..len]);
 | 
					    printArray(T, arr[0..len]);
 | 
				
			||||||
    std.debug.print("\n堆的树状表示:\n", .{});
 | 
					    std.debug.print("\n堆的树状表示:\n", .{});
 | 
				
			||||||
    var root =  try TreeUtil.arrToTree(T, mem_allocator, arr[0..len]);    // through TailQueue
 | 
					    var root =  try TreeUtil.arrToTree(T, mem_allocator, arr[0..len]);
 | 
				
			||||||
    try printTree(root, null, false);
 | 
					    try printTree(root, null, false);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user