Easy C++, Top Down ,  Knapsack(Take / Not take) approach with explanation.
Intuition\nf(skillMask , i) returns the mask of minimum person which fulfills the skills needed in skillMask if you can consider person from 0-i. \n\n# Approach
# Intuition\n$$f(skillMask , i)$$ returns the mask of minimum person which fulfills the skills needed in skillMask if you can consider person from *$$0-i$$.* \n\n# Approach\n1. firstly I hash all the required skills with their index to have a faster access.\n2. Then I calculate the skill mask of all person and store them in a vector(smp which stands for skill mask of person). for example. if a $$ith$$ person has 1 , 2 and 4 skill then I will store smp[i] = 22 because the mask will become $$10110$$ which equals 22.\n3. Now my help functions takes 2 argument mainly, $$skillMask$$ and $$i$$.\n4. $$skillMask$$ show which skills are required to be taken. for example if my $$skillMask$$ is $$100100110$$ then I need 1 ,2 , 5 , 8 skills and $$i$$ represents the range of person from 0 to $$i$$ which I can consider to fulfill my skills need.\n5. Now if I am on the $$ith$$ person then I have two choices either to take him or not. I will only take him if he has atleast one such skill which lowers the value of $$skillMask$$. Consider my skill mask to be $$11111$$ and skill mask of $$ith$$ person to be $$01100$$ so it brings 2 and 3 skills with him. So if I consider him then I dont need 2 and 3 skills further so I will do ($$11111$$ & ~($$01100$$)) = $$10011$$ which shows that now I only need 0,1 and 4 skills.\n6. At the end just return that value which has least number of set bits because set bits represent the number of person to be taken to fulfill the skill needs represented by $$skillMask$$.\n7. **Base Case** - If my skillmask equals 0 then  I have fulfilled all my skill requirement hence no need to add extra people so return 0. But if my $$skillmask$$ is not equal to 0 and I ran out of person then return such a value which has maximum number of person.\n8. And you can then finally add 3 extra lines of $$dp$$ to memoize the recursive solution.\n\n# Complexity\n- Time complexity:\n$$O(2^m * n)$$ where m is the size of req_skills and n is the size of people. \n\n- Space complexity:\n$$O(2^m * n)$$\n\n# Code\n```\nclass Solution {\npublic:\n    unordered_map<string , int> mp;\n    vector<int> smp;\n    int n , m;\n    long long help(int skillMask , int i , vector<vector<long long>> & dp){\n        if(skillMask == 0) return 0;\n        if(i < 0) return (1LL << n) - 1;\n        if(dp[i][skillMask] != -1) return dp[i][skillMask];\n        long long ans = ((1LL << n) - 1);\n        int reqSkills = skillMask & (~smp[i]);\n        long long take = (1LL << n) - 1;\n        if(reqSkills != skillMask){\n            take = help(reqSkills , i-1 , dp) | (1LL << i);\n        }\n        long long nottake = help(skillMask , i-1 , dp);\n        if(__builtin_popcountll(take) <= __builtin_popcountll(nottake)) return dp[i][skillMask] = take;\n        return dp[i][skillMask] = nottake;\n    }\n    vector<int> smallestSufficientTeam(vector<string>& req_skills, vector<vector<string>>& people) {\n        n = people.size();\n        m = req_skills.size();\n        for(int i = 0 ; i < m ; i++){\n            mp[req_skills[i]] = i;\n        }\n        smp.resize(n);\n        for(int i = 0 ; i < n ; i++){\n            int mask = 0;\n            for(auto & skills : people[i]){\n                mask |= (1 << mp[skills]);\n            }\n            smp[i] = mask;\n        }\n        vector<vector<long long>> dp(n , vector<long long>(1<<m , -1));\n        long long ans = help((1 << m) - 1 , n-1 , dp);\n        vector<int> a;\n        for(int i = 0 ; i < n ; i++){\n            //pushing all those index which brings the minimum value\n            if(ans & (1LL << i)) a.push_back(i);\n        }\n        return a;\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C++']