Not able to understand question properly

why there is circular and non circular approach to calculating maximum subarray sum.

hi vikash
simple logic is two cases follow in this.

no wrapping is there among the numbers that will produce maximum subarray sum
kadane’s algo will work perfectly fine.
wrapping exists in elements that will produce maximum subarray sum.
we need to change wrapping-> non wrapping
this can be done by
find out the sum of non contributing elements and subtract this sum from the total sum. To find out the sum of non contributing, invert sign of each element and then run Kadane’s algorithm.
Our array is like a ring and we have to eliminate the maximum continuous negative that implies maximum continuous positive in the inverted arrays
try to dry run the logic you will get to know the actual functionality.