We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81b5cb3 commit feb0f75Copy full SHA for feb0f75
1 file changed
Week06/MaxProfit6.java
@@ -12,7 +12,7 @@ public int maxProfit(int k, int[] prices) {
12
}
13
14
public int maxProfitAny(int[] prices, int k, int length) {
15
- int dp[][] = new int[k+1][2];
+ int dp[][] = new int[k + 1][2];
16
for (int i = 0; i < length; i++) {
17
for (int j = k; j >= 1; j--) {
18
if (i == 0) {
0 commit comments