Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
It can be proven that from each index <code>i</code>, the optimal solution is to jump to the nearest index <code>j > i</code> such that <code>nums[j] > nums[i]</code>.