DP + BITMASKING + BACKTRAKING.
Intuition\ndp + bitmasking\n\n# Approach\nstore the skill of each people as integer value using bitmasking, before that give each skill to a unique value.\nfor 
# Intuition\ndp + bitmasking\n\n# Approach\nstore the skill of each people as integer value using bitmasking, before that give each skill to a unique value.\nfor each skill from 1 to n check ith skill present in jth people or not.\nif YES then change the mask with new_mask by or operator to merge the skills till now by taking jth prople for ith skill.(other skills also addup if people has also unique skill which is not shown before).\n\nplease upvote the solution....\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int n;\n    unordered_map<string,int>mp;\n    vector<int>res;\n    int sz=INT_MAX;\n    unordered_map<string,int>dp;\n    void solve(int id,int mask,vector<int>&sp,vector<int>&z){\n        if(id>=n){\n            if(sz>z.size()){\n                res=z;\n                sz=z.size();\n            }\n            return;\n        }\n        if(mask & (1<<id)){\n            solve(id+1,mask,sp,z);\n            return;\n        }\n        for(int i=0;i<sp.size();i++){\n            if(sp[i]&(1<<id)){\n                int new_mask=(mask|sp[i]);\n                z.push_back(i);\n                solve(id+1,new_mask,sp,z);\n                z.pop_back();\n            }\n        }\n        return;\n    }\n    vector<int> smallestSufficientTeam(vector<string>& req_skills, vector<vector<string>>& people) {\n        this->n=req_skills.size();\n        int i=0;\n        for(auto it:req_skills){\n            mp[it]=i;\n            i++;\n        }\n        vector<int>sp;\n        for(auto it:people){\n            int temp=0;\n            for(auto s:it){\n                temp+=(1<<mp[s]);\n            }\n            sp.push_back(temp);\n        }\n        vector<int>z;\n        solve(0,0,sp,z);\n        return res;\n    }\n};\n```
['C++']