Alice and bob problem.......don't know what''s wrong with logic....kindly help

Initialize dp with INF and not 0

also for l[i] == 0, dp should be INF and not dp[i + 1]

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.

i am sorry i have mentioned wrong problem name

Its stiil not working…could you please give it a glance again.

Hi, Aman, unfortunately, I have now lost the access to the question, can you please ask the same doubt again (I’ll look at question and then answer it there).

Thanks