Rakuten OA 2024 | Maximum Score from Performing Multiplication Operations | Dynamic Programming

Rakuten · Question · Posted Jun 2026

Problem Statement You are given two integer arrays: nums of length n multipliers of length m where m ≤ n You must perform exactly m operations. In the i-th operation: Choose either the leftmost or rightmost element from nums. Multiply it by multipliers[i]. Add the result to your total score. Remove the chosen element from nums. Return the maximum possible score after performing all m operations. Example 1 Input nums = [1,2,3] multipliers = [3,2,1] Output 14 Explanation Operation 1: ...

The full answer & interview discussion are available to premium members.

Log in Create a free account