I think my code is correct!

I am pretty much confident about my solution, I even checked geeksforgeeks to verify my code.
Here is the link to my code.

Output is:
TESTCASE # 1 : correct (Time: 0 s)
TESTCASE # 2 : wrong-answer (Time: 0 s)
TESTCASE # 3 : wrong-answer (Time: 0 s)

Please check what might be wrong…

@sagnik.pal2017 hey sagnik pal your data type is not so efficient to store large no output change you data type long long instead of int and start loop from 0
ends_0[0] = ends_1[0] = 1;
return
ends_1[n-1] + ends_0[n-1];

I also got the same error thanks

Thanks, changing the data type worked.
But the constraints given in the question was 1<=t<=100 1<=n<=90.
That’s why I chose int.
And by the way instead of choosing 0 index to n - 1
my code chose 1 to n. So it was correct only.
Anyways thanks for your help !!