Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Define <code>dp[i]</code> as the maximum score if we start from index <code>i</code>.
We can calculate <code>dp[i]</code> as the maximum score from hopping to all indices <code>j > i</code>.