i think i am making mistake in understanding the problem here can u help please
Maximum circular sum
In this problem, there can be two cases i.e. either the subarray having maximum sum is
obtained in a circular fashion or the subarray having maximum sum is obtained in a non-
circular fashion.
The non-circular maximum sum subarray can be obtained directly by Kadane’s Algorithm.
But the subarray with circular fashion cannot be solved by Kadane’s algorithm.
So to solve this problem we will first calculate the maximum sum subarray using Kadane’s
Algorithm and store it in a variable, say candidate1. Then we will invert the sign of every
element of the array and again apply Kadane’s Algorithm to calculate the maximum sum
subarray of this new inverted array.
But we should keep in mind the fact that the maximum sum of the inverted subarray is actually
the minimum sum subarray for the original array. So if we subtract the negative value of this
new sum from the cumulative sum of the original array we will get another candidate for the
answer and name it candidate2. Then compare both the candidates and return the larger
number. That answer will be your maximum circular sum.
can u look at my code and see where i am making mistake
Pls send your code by saving on ide only, so that I could check and tell your mistakes.,