on dry run, every sample test case is working i dry ran my code till n=6 and output was same
Why none of the test case is working
hello @rsaini9416624750,
your solution time complexity is O(t*2^n) that why it is not working for large test cases.
use dynamic progrAMMING to optimise ur solution
but sir till now parteek sir didnt take any on dynamic programing
@rsaini9416624750
dont worry ur resursive code is correct.
after studying dp try this problem again .