One of my test case not giving right answer

Kinndly rectify my code

@7nishit
hello Nishit,
number of subsequence will be 2^n but u are printing n^2