• + 0 comments

    Hard to beat python simplicity for this things..

    from collections import Counter
    def equalizeArray(arr):
        return  len(arr) - Counter(arr).most_common(1)[0][1]