I am filling the dp array from the very end… if from a particular index i can make a direct jump to the end of the array i say dp[i] = 1; or i try alll possible jumps from that i and choose the minimum of all values.
Kindly tell if my logic is correct or not
Hi Laksh,
refer this https://ide.codingblocks.com/s/626538
try to debug on sample input… u would get better insight…
yar sample is running giving correct answer… kindly tell about my logic … i don’t want to see the solution right away
yes ur logic is correct…
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.
None of the case is passing
great
is there anything else?
bhaiya kindly tell the error in the code
batao bhyiii …
oh sry… i misread as all test cases are working… let me check
ho gya vro. You can close it.
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.