We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Equalize the Array
Equalize the Array
Sort by
recency
|
1938 Discussions
|
Please Login in order to post a comment
Write your code here
`ef equalizeArray(arr): counts={} for char in arr: counts[char] = arr.count(char) maxim= max(counts.values()) return len(arr)-maxim
`
Here is my O(N) c++ solution, you can watch the explanation here : https://youtu.be/8p9yuqSv4ek
Perl:
Python