Can you please tell why dp[i+1] +z is always greater then dp[i/2]+x and dp[i-1]+y

when i is even
It is always true for all types of array ??

hello @anshulgurawalia

yeah , it will always hold

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.