Please check why my code is not compiling on online ide but runs perfectly on my pc
Code not compelling on online ide
hello @Garvit012 there is no need to do with two dimensional dp . just make a dp of size target+1.
and your code will be able to pass all the test case .
and make your dp array of size target+1 only.
corrected code link :https://ide.codingblocks.com/s/319146.
i hope i have clear your doubt .
your feedback is important for us .
Happy Learning !!
I totally get your logic but still why isn’t my code compiling
hello @Garvit012 your code is giving tle because this question can be solves in more optimised way .
no doubt your code is giving the correct output for the test cases but it is taking more time .
I hope I have cleared your doubt !!
hello @Garvit012 i have made some changes in your code but still you wouldnt be able to submit .
though i have made soome changes .
I hope I have cleared your doubt !!
Happy Learning !!
hello @Garvit012 as you are not replying i am marking this doubt as resolved.
on or off the chance if you feel you still have any doubt you can open this again .
Happy Learning !!
