Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
It’s always optimal to jump to index <code>j</code> with the maximum value.
Keep an array <code>suffixMax</code> and store the maximum of each suffix of the array along with its index.