Sir i have a query like i gave tcs paid nqt on 17th april and I solved one question partially 4/7 test cases and other question completly and in my overall scorecard i got 79.59 then there will be any chances that i will get mail for any profile in tcs or by other tcs affiliated companies.
Weight of stone is already given in the problem. Your task is to find the cnt with the help of given weight. W[] is fix. It is not taken by the user... IF the W[] is custom than we can use DP approach...
Weight Is already given (1,2,5,10,20,50,100,500,1000) Using thus Weight find the Minimum number of Weight stone... So that's why DP is not Needed. BTW this is very easy question.
Sir i have a query like i gave tcs paid nqt on 17th april and I solved one question partially 4/7 test cases and other question completly and in my overall scorecard i got 79.59 then there will be any chances that i will get mail for any profile in tcs or by other tcs affiliated companies.
But for multiple test cases it fails for example input arr={1,5,6,9} and n=11 it fails so,better to use DP in it
Weight of stone is already given in the problem. Your task is to find the cnt with the help of given weight. W[] is fix. It is not taken by the user...
IF the W[] is custom than we can use DP approach...
bhai glt h aapka solution dp lagao solve ho jayega aap aik test case lo weight - 1 2 25 47 and here n = 50 yha aaapna soltion fail ho jayega
Weight Is already given (1,2,5,10,20,50,100,500,1000)
Using thus Weight find the Minimum number of Weight stone...
So that's why DP is not Needed. BTW this is very easy question.