MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Method main

knapsack.java:28–35  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

26 }
27
28 public static void main(String[] args) {
29 int[] val = new int[] { 10, 4, 9, 11 };
30 int[] wt = new int[] { 3, 5, 6, 2 };
31 int W = 7;
32 int n = val.length;
33 knapsack ob = new knapsack();
34 System.out.println("Maximum value in Knapsack: " + ob.knap(wt, val, W, n));
35 }
36
37}

Callers

nothing calls this directly

Calls 1

knapMethod · 0.95

Tested by

no test coverage detected