I have applied correct logic for the question can you ease help me out in this
Test case are not passing out
a)
declare ur dp size of atleast n+2
b) apply mod in
dp[i]=(dp[i-1] + dp[i-2]) %mod;
the test case will still not pass becuase n is big .
try to do it in O(1) space .
hint -> this problem is same as calculating nth fibonnaci
Itis not showing any space complexity error it is showing that your answer is wrong please help me out with that
these changes are for removing wa only
i have done that changes alrady which you asked for then only it is showing the error
check now->
Still getting MLE error on last testcase
… . . . . . . . .
It is not passing as now time compexity is become a proble