C# A Simple Guide to Solving This Problem with Clean Code
Intuition\nFirst thought is to iterate through people and either take or not take: time complexity $O(2^n)$ - this is too large since n is 60\n\nHowever require
# Intuition\nFirst thought is to iterate through people and either take or not take: time complexity $O(2^n)$ - this is too large since n is 60\n\nHowever required skills is only at most 16, so there are only 65,536 possible skills combinations. This is a workable number. Furthermore a bitmask can be used to convert skill combinations to integers and bit manipulation can then be used to quickly combine skill combinations.\n\n# Approach\n1. Start with a single skill set that contains no skills.\n2. Iterate through people list and add their skill set to each existing skill set. Check if this is the fewest number of people for this skill set, if so keep it, otherwise discard it.\n3. Once you have iterated through all people, return the list of people that make up the skill set that contains all skills. \n\n# Complexity\n$m$ - is the number of required skills\n$n$ - is the number of people\n- Time complexity:\n$O(2^m * n)$\n\n- Space complexity:\n$O(2^m)$\n\n# Code\n```\npublic class Solution {\n    public int[] SmallestSufficientTeam(string[] req_skills, IList<IList<string>> people) {\n        Dictionary<string, int> bitMaskKey = BuildBitMask(req_skills);\n        Dictionary<int, List<int>> skillSets = new Dictionary<int, List<int>>();\n        skillSets[0] = new List<int>();\n        for (int i = 0, bitmask, newBitmask; i < people.Count; ++i) {\n            bitmask = ConvertPersonToBitMask(bitMaskKey, people[i]);\n            foreach (int key in skillSets.Keys.ToArray()) {\n                if ((key & bitmask) != bitmask) {\n                    newBitmask = (key | bitmask);\n                    if (!skillSets.ContainsKey(newBitmask) || (skillSets[newBitmask].Count > (skillSets[key].Count + 1))) {\n                        skillSets[newBitmask] = new List<int> (skillSets[key]);\n                        skillSets[newBitmask].Add(i);\n                    }\n                }\n            }\n        }\n        return skillSets[ConvertPersonToBitMask(bitMaskKey, req_skills)].ToArray();\n    }\n\n    private Dictionary<string, int> BuildBitMask(string[] req_skills) {\n        Dictionary<string, int> bitMaskKey = new Dictionary<string, int>();\n        int val = 1;\n        foreach (string skill in req_skills) {\n            bitMaskKey.Add(skill, val);\n            val *= 2;\n        }\n        return bitMaskKey;\n    }\n\n    private int ConvertPersonToBitMask(Dictionary<string, int> bitMaskKey, IEnumerable<string> person) {\n        int bitmask = 0;\n        foreach (string skill in person) {\n            bitmask += bitMaskKey[skill];\n        }\n        return bitmask;\n    }\n}\n```
['Hash Table', 'Dynamic Programming', 'Bit Manipulation', 'Bitmask', 'C#']