in this i think i am wrong in calculating cum_sum but i am not able to understand why???
Https://ide.codingblocks.com/s/279019
@architsuryavanshi you are making the same mistake as your previous code (sum pair one)…you are updating the value of i at 2 places… how will it work? do a dry run it will become clear.
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.