update zig codes for Section 'Space Complexity' and 'Space Time Tradeoff'

This commit is contained in:
sjinzh
2023-01-10 17:19:21 +08:00
parent 2d461b03a4
commit 2572b83540
8 changed files with 23 additions and 4 deletions

View File

@@ -44,6 +44,10 @@ const SolutionHashMap = struct {
// Driver Code
pub fn main() !void {
// 查看本地CPU架构和操作系统信息
var native_target_info = try std.zig.system.NativeTargetInfo.detect(std.zig.CrossTarget{});
std.debug.print("Native Info: CPU Arch = {}, OS = {}\n", .{native_target_info.target.cpu.arch, native_target_info.target.os.tag});
// ======= Test Case =======
var nums = [_]i32{ 2, 7, 11, 15 };
var target: i32 = 9;