You are viewing a single comment's thread. Return to all comments →
C++ solution
int equalizeArray(vector<int> arr) { std::array<int, 100> a{}; for (const auto& e : arr) ++a[e]; return arr.size() - *std::max_element(a.begin(), a.end()); }
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 →
C++ solution