https://practice.geeksforgeeks.org/problems/count-number-of-hops/0
why is this giving wrong ans i have used top down dp
plz correct this code of mine and explain
dont forward link of editorial…
https://practice.geeksforgeeks.org/problems/count-number-of-hops/0
why is this giving wrong ans i have used top down dp
plz correct this code of mine and explain
dont forward link of editorial…
plz reply at the earliest…
Hey Devansh, your logic is incorrect as your step size always decreases.
example your code will not account for this step combination
1,2,1,1 to reach 5.
Plz correct my code along with explaination …and send it
Make changes in my code …
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.