Hello, I need some help in this question. Please just explain me what the problem want to say and what is actually happening in the sample input ? How it is working ?
Doubt in understanding the problem
7
8 -8 9 -9 10 -11 12
in this example
max circular sum is 12+8 -8+9-9+10=22
circular sum means after last index you again come at 0th index
so to solve this question you have to consider both the ways circular or without circular and at last take max of both
you have to use Kadane’s algorithm to solve this problem efficiently
1 Like