Maximum sum circular subarray

I am trying to solve with same code on leet code but it gives wrong answer