You are viewing a single comment's thread. Return to all comments →
Why would you use .items() ? Counter is like a dict, just get the .values
.items()
Counter
dict
.values
from collections import Counter def equalizeArray(arr): return len(arr) - max(Counter(arr).values())
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
Why would you use
.items()
?Counter
is like adict
, just get the.values