Skip to content

Commit 628ce16

Browse files
authored
Update minimum-array-sum.cpp
1 parent 749eb24 commit 628ce16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-array-sum.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Solution {
1919
}
2020
if (i - 1 >= 0 && j - 1 >= 0) {
2121
if (x - k >= 0) {
22-
dp[i][j] = min(dp[i][j], dp[i - 1][j - 1] - x + (((x - k) + 1) / 2));
22+
dp[i][j] = min(dp[i][j], dp[i - 1][j - 1] - x + ((x - k) + 1) / 2);
2323
}
2424
if ((x + 1) / 2 - k >= 0) {
2525
dp[i][j] = min(dp[i][j], dp[i - 1][j - 1] - x + ((x + 1) / 2 - k));

0 commit comments

Comments
 (0)