C++ || Sliding Window approach || Removing circularity
,,,\n\n    int minSwaps(vector& nums) {\n         \n        int window=count(nums.begin(), nums.end(), 1);  //determining window size by counting number of occu
,,,\n\n    int minSwaps(vector<int>& nums) {\n         \n        int window=count(nums.begin(), nums.end(), 1);  //determining window size by counting number of occurance of 1.\n        nums.insert(nums.end(), nums.begin(), nums.end()); //in order to convert circular array to linear one appending the same array at the end of itself.\n        int count=0, comp;\n        for(int i=0; i<window; i++){   //now counting occurance of 1 in first window.\n            if(nums[i]==1){\n                count++;\n            }\n        }\n        comp=count;\n        \n        for(int i=1; i<nums.size()-window+1; i++){   //checking for the the element just before the first element of the current window.\n            if(nums[i-1]==1){       \n                count--;\n            }\n            if(nums[i+window-1]==1){    //checking for last element of the window if 1 occurs then increment by 1.\n                count++;\n            }\n            if(count>comp){   //if minimum swaps are required then in a particular window we require maximum occurance of 1 so as to have minimum number to zero, if occurance of 0 will be less then less number of swaps are required.\n                comp=count;\n            }\n        }\n        return (window-comp);   \n    }\n};\n\'\'\'
['C', 'Sliding Window']