

For the given array ‘arr’ = {1,0,1,1} we can swap the first and second elements, and all 1s will be shifted to the right side and 0s to the left side. Hence a minimum number of operations required is 1.
The first line contains a single integer ‘T’ denoting the number of test cases, then each test case follows.
The first line of each test case contains an integer ‘N’, denoting the size of the array.
The second line of each test case contains ‘N’ space-separated integers representing the elements of the array.
For each test case, print the minimum number of swaps required to arrange 0 to one side and 1 to the other side.
Output for each test case will be printed in a separate line.
You are not required to print anything; it has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= N <= 10^6
0 <= arr[i] <= 1
Time limit: 1 sec
We will try to push all the 1s towards the left side.
After that, we will try to push all the 1s towards the right side.
The minimum number of swaps required in both cases will be our answer.
Again, we will try to push all the 1s towards the right side and count the number of operations. And after that, we will try to push 1s towards the right and count the number of operations. Minimum of both is going to be our answer.