#1770
Maximum Score from Performing Multiplication Operations
master · 1630 · lc hard +32 · verified · 43.2% accepted · 2,593 likes · top 25%
Description
You are given 0-indexed integer arrays nums (size n) and multipliers (size m, n >= m). Perform m operations: on operation i (0-indexed), pick one integer x from either end of nums, add multipliers[i] * x to your score, and remove x. Return the maximum score after all m operations.
Code
1
2
3