In the video bhaiya says that In the case when i is even, we will only consider the case when it is formed from either i/2 or i-1. He said we’ll ignore the case of i+1 as it’s cost will be higher. I didn’t understand this. Why would the cost be higher?
Dynamic Programming, Cell Mitosis Problem
When i is even…i+1 would be odd…and for calculating dp[i+1] there, we would only have one option (since i+1 is odd, and we do not know dp[i] as yet) ie double dp[(i+2)/2] and then reduce one. To calculate dp[i]…we further have to reduce one from it and it will always cost more than any of the other two options.
1 Like
Hey Prabal,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.
1 Like