Sir/Ma’am,
If we are dealing odd integer then dp[(i+1)/2] + cost of doubling + cost of decrementing is used as dp[i+1] is not computer . why can’t we do the same for i/2 in the case of odd as well and why can’t we do that for i+1 in case of even i .