mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-08 21:46:06 +00:00
(PR #217)update a .gitignore file in the codes/zig dir
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// 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 ", " });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user