185. Maximum Score From Multiplying

Given arrays nums and multipliers. Choose multipliers.Length elements from nums (from either end), multiply each by the corresponding multiplier, and return the maximum sum.
Example 1
Input: nums = [1,2,3], multipliers = [3,2,1]
Output: 14
Explanation: 3×1 + 2×2 + 1×3 = 14.
Example 2
Input: nums = [-5,-3,-3,-2,7,1], multipliers = [-10,-5,3,4,6]
Output: 102
Explanation: Optimal choice of elements from the ends of the array.
arraysdynamic programminghard
JavaScript
Loading...
Line 1, Char 1