is whole array also a sub array,
like if I enter all elements positive then sum will be of whole array or not?
Maximum sub array sum
@Bansaljatin05 Yes the whole array is also considered as a subarray. So if you enter all positive elements then maximum subarray sum will be the sum of all elements.
Hope this helps
1 Like