We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5507e18 commit d380f3bCopy full SHA for d380f3b
src/main/java/g1701_1800/s1770_maximum_score_from_performing_multiplication_operations/Solution.java
@@ -3,14 +3,12 @@
3
// #Medium #Array #Dynamic_Programming #2022_04_30_Time_31_ms_(92.41%)_Space_53.2_MB_(88.74%)
4
5
public class Solution {
6
-
7
public int maximumScore(int[] nums, int[] mult) {
8
int n = nums.length;
9
int m = mult.length;
10
int row = m;
11
int[] dp = new int[m];
12
int[] prev = new int[m + 1];
13
14
while (--row >= 0) {
15
for (int i = 0; i <= row; ++i) {
16
dp[i] =
@@ -20,7 +18,6 @@ public int maximumScore(int[] nums, int[] mult) {
20
18
}
21
19
prev = dp;
22
23
24
return dp[0];
25
26
0 commit comments