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