You are given an array A of size N . In one operation , you can: Select indices i and j with i≠j Set A i = A j You need to find the minimum number of operations required to make all elements of the array equal . 1. Problem Restatement For each test case: You have an array A of size N . Operation: pick two positions i and j (i≠j) and assign A i = A j . After some operations, you want all elements of A to be the same. Goal: Output the minimum number of operations needed. Input Format: First line: integer T — number of test cases. For each test case: First line: integer N — array size. Second line: N space-separated integers — elements of array A . Output Format: For each test case, print the minimum number of operations on a new line. Constraints: 1 ≤ T ≤ 1000 1 ≤ N ≤ 2* 10 5 1 ≤ A i ≤ ...