i need the explaination of the question
I didn't understand the question
In this problem we are given a circular array (Think of the array as a ring, ie. where the 0th indexed element is the next element of the last element). The array has both +ve and -ve numbers. We need to choose a starting point and an ending point in this array such that the sum of elements from the starting point to the ending point is maximum. We then need to return the largest sum that we obtained.
For the given array of size 7
7
8 -8 9 -9 10 -11 12
The subarray contributing to the result in this case is:
8 -8 9 -9 10 -11 12
If we start from 12 and start calculating the sum we can obtain (12+8-8+9-9+10) = 22
See that the element 8 is the next element of element 12
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.