You are viewing a single comment's thread. Return to all comments →
Python3 solution
s = sorted(set(arr)) k = [] for x in range(0,len(s)): k.append(arr.count(s[x])) return(len(arr)-max(k))
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
Python3 solution