Only 1 test case working

please check the problem in the code.

hi @Akshita99 this problem can be done easily using 1D dp. The recurrance relation will be
f(n) = f(n-1) + f(n-2)

yeah it can be done in that way but can you please tell the problem in my code. it should work with that method also

@Akshita99 please explain your logic a bit.