Problem :

https://www.hackerrank.com/challenges/equality-in-a-array/problem


My Solution :

#!/usr/bin/env python3


def equalize_array(arr):
    counter = [0 for _ in range(101)]
    for a in arr:
        counter[a] += 1
    return len(arr)-max(counter)


n = int(input())
arr = list(map(int, input().rstrip().split()))
result = equalize_array(arr)
print(result)