mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-24 02:21:30 +08:00
Refine some details and coding style for Rust codes (#344)
* Refine some details and coding style for Rust codes * Update coding style for Rust codes * Update time_complexity.rs * Update array.rs * Update leetcode_two_sum.rs * Update hash_map.rs * Update file headers * Update coding style for Rust codes and Zig codes * Update coding style for Rust codes and Zig codes --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -68,8 +68,8 @@ pub fn main() !void {
|
||||
std.debug.print("\n堆元素数量为 {}\n", .{size});
|
||||
|
||||
// 判断堆是否为空
|
||||
var isEmpty = if (maxHeap.len == 0) true else false;
|
||||
std.debug.print("\n堆是否为空 {}\n", .{isEmpty});
|
||||
var is_empty = if (maxHeap.len == 0) true else false;
|
||||
std.debug.print("\n堆是否为空 {}\n", .{is_empty});
|
||||
|
||||
// 输入列表并建堆
|
||||
try minHeap.addSlice(&[_]i32{ 1, 3, 2, 5, 4 });
|
||||
|
||||
Reference in New Issue
Block a user