You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The maximum profit using top-down DP should be 50.");
31
+
assertEquals(expectedProfit, WineProblem.wptd(wines, 0, wines.length - 1, newint[wines.length][wines.length]), "The maximum profit using top-down DP should be 50.");
34
32
}
35
33
36
34
/**
@@ -40,8 +38,7 @@ void testWptd() {
40
38
voidtestWpbu() {
41
39
int[] wines = {2, 3, 5, 1, 4}; // Prices of wines
42
40
intexpectedProfit = 50; // The expected maximum profit
"The maximum profit for no wines should throw an IllegalArgumentException.");
70
+
assertThrows(IllegalArgumentException.class, () -> WineProblem.wpbu(wines), "The maximum profit for no wines should throw an IllegalArgumentException.");
0 commit comments