You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
336 B
14 lines
336 B
2 years ago
|
// File: TreeNode.zig
|
||
|
// Created Time: 2023-01-07
|
||
|
// Author: sjinzh (sjinzh@gmail.com)
|
||
|
|
||
|
const std = @import("std");
|
||
|
|
||
|
// Print an Array
|
||
|
pub fn printArray(comptime T: type, nums: []T) void {
|
||
|
std.debug.print("[", .{});
|
||
|
for (nums) |num, j| {
|
||
|
std.debug.print("{}{s}", .{num, if (j == nums.len-1) "]\n" else ", " });
|
||
|
}
|
||
|
}
|