it shows error for this input only…
(6 256324
1 2 5 10 20 50)
how to correct it…
plz tell along with explaination…i have used top down dp…
Minimum coin change problem
plz reply at the earliest…
@S19LPPP0202 you are not handling the case where sum is not possible well
looking at a smaller example
1 11
5
even this input is giving a segmentation fault so try to rectify your code accordingly
hi @S19LPPP0202 are you sure you shared the correct code? I ran it on other inputs as well and it is not running for any of them. Please share the correct code
yes this is corrected version
i shared wrong code by mistake plz correct it
Plz correct my code I want to solve this using top down only…it is just failing 1 testcase…
Don’t forward Greeks for geeks link
I don’t want to use bottom up dp so plz correct my code so that I can submit it on hackerrank…
Plz reply at the earliest
@S19LPPP0202 please look at the discussion of this challenge, it appears there is some problem with the test cases. Try to solve this problem somewhere else
No there is no problem in testcases…my code has already passsed 4 testcases…it is only failing for one testcase correct it for that
it shows error for this input only…
6 256324
1 2 5 10 20 50
Correct the code of mine and send it fast
@S19LPPP0202 this is my code that passed all the test cases https://ide.codingblocks.com/s/284419 i used 1-D DP
Plz correct my code I want to code it my way …I don’t want to copy any code u plz tell me why is it failing for 1 test case only… …
I want to solve it using top down approach only…
Hope now that you will send my corrected code only now…
@S19LPPP0202 i have provided you top-down approach only what is the problem now? You asked for a top-down dp approach and I provided it I dont know what else I can do. 2D dp is not needed here so dont over-complicate the 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.
reply to this problem of mine…
@S19LPPP0202 i’d suggest you to raise a doubt again, I dont think it has been posted on the doubt platform