i dont know where i am doing the mistake
getting only 2 test case correct . rest are wrong
Coin change problem
you will get a tle with this approach.
do it using tabular dp method.
but the top down dp and bottom up dp have nearly same time complexicity na except some call stack.
then how i am getting tle
n is 1000000.
your dp array is iniatialised till 10000.
i am not able to form 2d dp array of that size (says internal error))
u can make 2d array of max size 10^4 globally
int dp[1000][10000]