One test case is not getting passed. Although I think the logic is correct
hello @arsundram
use 2dp.
dp[i][j] = ways when u are at ith index and j (either 0 or 1 depends what u have taken so far
j=sum_sum_far%2) .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.