diff --git a/current/algorithms/numbers-zig/numbers.zig b/current/algorithms/numbers-zig/numbers.zig index 1c5c1a0..d732eb5 100644 --- a/current/algorithms/numbers-zig/numbers.zig +++ b/current/algorithms/numbers-zig/numbers.zig @@ -16,16 +16,16 @@ test "simple partition #1" { defer { allocator.free(arr); } - const res = bipartition(arr, 0, @as(u64, arr.len-1), 2); + const res = bipartition(arr, 0, @as(u64, arr.len - 1), 2); std.log.warn("Res {}", .{res}); try expect(res == 1); } pub fn bipartition(arr: []u64, t1: u64, t2: u64, v: u64) u64 { - std.log.warn("Arr called with {}, {}, {}", .{t1, t2, v}); - var x1:u64 = t1; - var x2:u64 = t2; - var x:u64 = undefined; + std.log.warn("Arr called with {}, {}, {}", .{ t1, t2, v }); + var x1: u64 = t1; + var x2: u64 = t2; + var x: u64 = undefined; if (arr.len <= 0) { return x1; @@ -40,7 +40,7 @@ pub fn bipartition(arr: []u64, t1: u64, t2: u64, v: u64) u64 { } while (x1 < x2 - 1) { - std.log.warn("Round {},{}", .{t1, t2}); + std.log.warn("Round {},{}", .{ t1, t2 }); x = (x1 + x2) / 2; if (arr[x] < v) { x1 = x;