Simple Backtracking
\nclass Solution {\npublic:\n    int n,dp[62][(1<<16)+2];\n    vector<int> v,cur,ans;\n    unordered_map<string,int> mp;\n    \n    void sol(int id,int mask)\n 
```\nclass Solution {\npublic:\n    int n,dp[62][(1<<16)+2];\n    vector<int> v,cur,ans;\n    unordered_map<string,int> mp;\n    \n    void sol(int id,int mask)\n    {\n        if(mask==(1<<n)-1)\n        {\n            if((int)cur.size()<(int)ans.size() || (int)ans.size()==0)\n                ans=cur;\n            return ;\n        }\n        \n        if(id==n || ((int)cur.size()>(int)ans.size() && ans.size()>0)) return ;\n        \n        if(mask & (1<<id)) sol(id+1,mask);\n        else\n        {\n            for(int i=0;i<(int)v.size();i++)\n                if(v[i] & (1<<id))\n                {\n                    cur.push_back(i);\n                    sol(id+1,mask|v[i]);\n                    cur.pop_back();\n                }\n        }\n    }\n    \n    vector<int> smallestSufficientTeam(vector<string>& sk, vector<vector<string>>& peo) \n    {\n        n=sk.size();\n        for(int i=0;i<n;i++)\n            mp[sk[i]]=i;\n        for(int i=0;i<peo.size();i++)\n        {\n            int mask=0;\n            for(int j=0;j<peo[i].size();j++)\n                mask|=(1<<mp[peo[i][j]]);\n            v.push_back(mask);   \n        }\n        \n        sol(0,0);\n        return ans;         \n    }\n};\n```
['Backtracking', 'C', 'C++']