Why we need to return the smallest negative element when all the elements are negative as in the normal case we were not handling the actual negative sum and making the assumption of the sum=0. and returning it.
Special Case Handling Not Understood
Just depends on the demand of the question, not a big deal.
If atleast one element has to be taken, return smallest else return 0.