For the ‘>’ operator,
dp(i, g+1) = dp(i+1, g+1) + dp(i+1, g+2) + … + dp(i+1, g+s)
and
dp(i, g) = dp(i + 1, g) + dp(i + 1, g + 1) + … + dp(i + 1, g + s-1)
so shouldn’t dp(i, g+1) be
dp(i, g+1) = dp(i, g) - dp(i+1, g) + dp(i+1, g+s) as dp(i, g) does the sum only upto do(i+1, g+s-1) term and not dp(i+1, g+s).
Doubt in recurence for '>' operator
Hello Rakshit, ya your argument is alright as you said. Can you pls tell me the moment or the timing of the video from where you are facing the issue ??
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.