You are given an array \(A\) containing \(N\) integers. You can apply the following operation on the array:
Find the minimum number of operations required to make all integers of the array equal.
Input format
Output format
For each test case, print the minimum number of operations required to make all integers of the array equal.
Constraints
\(1 \leq T \leq 10^4 \\ 1 \leq N \leq 10^5\\ \\1\leq A_i \le 10^9 \\ Sum\; of \; N\;over\;all\;test\;cases\;does\;not\;exceed\;2\cdot 10^5. \)
Test case 1: Choose i = 2 and split A[2] = 4 into X = 2, Y = 2 making A = [2, ,2, 2]. Now all elements of the array are equal.
Test case 2: