CAN U GIVE ME SOME ANOTHER EXAMPLE OF THIS PROBLEM.
IN TE EXAMPLE GIVEN I DIDN’T UNDERSTOOD HOW THE SUM IS 22?
MAXIMUM CIRCULAR SUM PROBLEM
hi @Mayankrocks
basically u have to consider the array as circular, ie after last element u can take into consideration first element…
for example consider an array with elements 1 2 -3 -5 6
then ans will be 6 + 1 +2 = 9…
u can refer this for better understanding…
why did u left the -3 and -2 in sum?
why did u left the -3 and -5 in sum?
send me feedback link
Just bcoz we have to make overall sum maximum…
Ur doubt is cleared?
so in each array we have to leave smallest elements right?
no, in some cases we might have to include the negative elements as well, to increase the overall subarray sum… go through the video lecture I shared above for better understanding…
share the feedback link
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.