My 2 test case giving tle
@ayushwahi3005
your soln was exponential in complexity,you have to initialise dp array outside the binary function.
i have fixed your code.please have a look.
@ayushwahi3005
your soln was exponential in complexity,you have to initialise dp array outside the binary function.
i have fixed your code.please have a look.