• + 0 comments
        public static int equalizeArray(List<Integer> arr) {
        // Write your code here
            Set<Integer> liste = new HashSet<>(arr);
            int occ;
            int most=0;
            for(int n : liste){
                occ=0;
                for(int m : arr){
                    if(n==m){
                        occ++;
                    }
                }
                if(occ>most)
                    most=occ;
            }
            return arr.size()-most;
        }