Given a circular binary array arr[] consisting of only 0s and 1s, find the minimum number of swaps required to group all the 1s together at any position in the array.In a circular array, the first and the last elements are considered adjacent.Examples:Input: arr[] = [1, 0, 1, 0, 1]Output: 1Explanation: Only 1 swap is required. Swapping index 1 and 4 will give
This is a summary. For the full story, refer to the original source. Public of India presents verified citizen-relevant reporting.