Skip to content

Commit 2fed05e

Browse files
Added new files to build.zig
1 parent 2f58c2f commit 2fed05e

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

build.zig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ pub fn build(b: *std.Build) void {
7777

7878
// Dynamic Programming algorithms
7979

80+
if (std.mem.eql(u8, op, "dp/coinChange"))
81+
build_algorithm(b, .{
82+
.optimize = optimize,
83+
.target = target,
84+
.name = "coinChange.zig",
85+
.category = "dp"
86+
});
87+
if (std.mem.eql(u8, op, "dp/knapsack"))
88+
build_algorithm(b, .{
89+
.optimize = optimize,
90+
.target = target,
91+
.name = "knapsack.zig",
92+
.category = "dp"
93+
});
8094
// Math algorithms
8195
if (std.mem.eql(u8, op, "math/ceil"))
8296
build_algorithm(b, .{

runall.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ rem Data Structures
2222
%ZIG_TEST% -Dalgorithm=ds/lrucache %Args%
2323

2424
rem Dynamic Programming
25-
%ZIG_TEST% -Dalgorithm=dynamicProgramming/coinChange %Args%
26-
%ZIG_TEST% -Dalgorithm=dynamicProgramming/knapsack %Args%
25+
%ZIG_TEST% -Dalgorithm=dp/coinChange %Args%
26+
%ZIG_TEST% -Dalgorithm=dp/knapsack %Args%
2727

2828
rem Sort
2929
%ZIG_TEST% -Dalgorithm=sort/quicksort %Args%

runall.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ $ZIG_TEST -Dalgorithm=ds/linkedlist $Args
2222
$ZIG_TEST -Dalgorithm=ds/lrucache $Args
2323

2424
# Dynamic Programming
25-
$ZIG_TEST -Dalgorithm=dynamicProgramming/coinChange $Args
26-
$ZIG_TEST -Dalgorithm=dynamicProgramming/knapsack $Args
25+
$ZIG_TEST -Dalgorithm=dp/coinChange $Args
26+
$ZIG_TEST -Dalgorithm=dp/knapsack $Args
2727

2828
## Sort
2929
$ZIG_TEST -Dalgorithm=sort/quicksort $Args

0 commit comments

Comments
 (0)