Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use dynamic programming. dp[i] is max jumps you can do starting from index i. Answer is max(dp[i]).
dp[i] = 1 + max (dp[j]) where j is all indices you can reach from i.