c++ dp bitmask solution, with algorithm
Enumerate given skills. Their index will act as index of bit when we do bitmasking. Also create a set to store diff combination of skills (bitwise).\n2. for eac
1. Enumerate given skills. Their index will act as index of bit when we do bitmasking. Also create a set to store diff combination of skills (bitwise).\n2. for each people :\n2.1  calculate bitmask of all its skill\n\tfor each prev bitmask in our set:\n\t2.1.1 calculate combo of prev and curr skill\n\t2.1.2  if  combo doesn\'t exist already , add it with this people id\n\t2.1.3  if combo bitmask exists but with a larger group of people, replace it with current people and group of people with prev bitmask\n\n3. return group of people with bitmask (1<<(skills.size())) -1.\n```\n\t\tint n = req_skills.size();\n\t\tunordered_map<int,vector<int>> res;  // using unordered_map, we improve on time\n        res.reserve(1 << n);    // using reserved space, we avoid rehash\n        //map<int,vector<int>> res;\n        res[0]={};\n        unordered_map<string,int> skill_map;\n        for(int i=0;i< req_skills.size();i++)\n            skill_map[req_skills[i]]=i;\n        \n        for(int i=0;i<people.size();i++)\n        {\n            int curr_skill = 0;\n            for(int j=0;j<people[i].size();j++)\n                curr_skill |= 1<<skill_map[people[i][j]];\n            \n            for(auto it = res.begin();it!=res.end();it++)\n            {\n                int comb = it->first | curr_skill;\n                if(res.find(comb)==res.end() || res[comb].size()>1+res[it->first].size())\n                {\n                    res[comb]=it->second;\n                    res[comb].push_back(i);\n                }       \n            }\n        }\n        return res[(1<<n) -1];\n```
['Dynamic Programming', 'C', 'Bitmask']