diff --git a/day3.zig b/day3.zig index 9954761..759da1c 100644 --- a/day3.zig +++ b/day3.zig @@ -4,10 +4,6 @@ const Io = std.Io; const shared = @import("shared.zig"); const print = shared.print; -// for each value, -// build a list of all possible subvalues it can combine with, -// trim to largest for each value - // limited single loop for part 1 pub fn findLargest(line: []const u8, charsLeft: usize) usize { var largest: u8 = 0; @@ -104,19 +100,3 @@ pub fn main(init: std.process.Init) !void { print("part1 {d}", .{part1}); print("part2 {d}", .{part2}); } -//while (lineIter.next()) |l| { -// const line = shared.trim(l); -// lineLargest = 0; -// for (line[0 .. line.len - 1], 0..) |c, i| { -// const offset = findLargest(line[i + 1 .. line.len]) + i + 1; -// digits.clearRetainingCapacity(); -// try digits.append(allocator, c); -// try digits.append(allocator, line[offset]); -// const x = try std.fmt.parseInt(i64, digits.items, 10); -// if (x > lineLargest) { -// print("{d}", .{x}); -// lineLargest = x; -// } -// } -// part1 += lineLargest; -//}