3
bool hasGroupsSizeX(vector<int> &deck) {4
std::unordered_map<int, int> map;5
for (int i = 0; i < deck.size();6
i++) // store in unordered_map the amount of cards with each number10
for (std::pair<int, int> num : map) // find minimum12
if (num.second < x) x = num.second;14
if (x < 2) return false;16
for (int i = 2; i <= x; i++) // loop through all numbers smaller than minimum19
for (std::pair<int, int> num : map) // if all groups of cards divide by i - flag stays true21
if (num.second % i != 0) {26
if (good) return true;