Circular subarray sum

whats the problem with this code
too large o(N)?

Please save your code on ide.codingblocks.com and then share its link.

can you help me by telling a test case where it will go wrong

Include an endl after line 61 and then check if test cases are passed.

Also i think…you are duplicating /doubling your array and then applying Kadane.
A better approach is there. You can refer the editorial or refer this link:

Also you have to take care not to have a sum with more elements than the initial array.

using a loop i am taking only n elements at a time