sir what value of last_digit should i supposed to send in the function call…i’ve send -1 in the given code but not getting correct ans…i cant understand the framework of dp table…?
Count binary string
i suppose n should be send instead of -1, but i am not pretty sure
i thought of a simpler approach
i have added sufficient comments for u to understand
also in ur code
u are taking dp[91][2]
and then later u are sending in the input digit from user end which can be greater than 2 & then acessing that dp[x][n] index which is out of bound