3282. Reach End of Array With Max Score
You are given an integer array
nums
of lengthn
.Your goal is to start at index
0
and reach indexn - 1
. You can only jump to indices greater than your current index.The score for a jump from index
i
to indexj
is calculated as(j - i) * nums[i]
.Return the maximum possible total score by the time you reach the last index.
1 | class Solution { |