Here while calculating current sum why at the end why -2(-ve) is made to 0
Calculating the current sum
Instead of taking a -ve current sum, we prefer to take 0. Because we have to calculate MAXIMUM SUM and adding a -ve number to anything will make it smaller, so its better to not add anything(add 0) rather than adding a -ve number
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.