I came across this question but could not understand this part of its editorial:
If the array elements are all non-negative, we can use binary search to find the answer in O(n log S) time, where S is the maximum sum of a subarray.
I saw this similar post but could not understand the approach. It would be really helpful if someone could explain how to do this question in O(n logS) in case of non-negative integer array