Minimum Jumps Required- DP

Hello sir/ma’am, my code for this question is unable to pass any test case. Could you please tell me what’s the mistake? I am unable to find any error…Is my logic for this wrong??

@priyanshi.agarwal3405,
Corrected Code: here

Sir, if t==0 then why can’t we simply return 0 and returning INT_MAX instead??

@priyanshi.agarwal3405,
Because A/Q

Hint - If N==0 you can never move forward, your return INT_MAX (Infinity).

It is given in problem

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.