You are given an array consisting of $$$n$$$ positive integers. You are standing at the first index, and you want to reach the last index. You can make as many forward jumps as you want. If you jump from index $$$i$$$ to $$$j$$$ your profit is $$$(j - i) \cdot a[i]$$$. What is the maximum total sum of profits that you can achieve?
I created a blog on this topic discussing how the DP optimization for this problem is easier than you think or harder than you think.
https://cfstep.com/training/tutorials/dp/the-hardest-easy-dp-problem/