70% Beat Rate, Bit Manipulation + DP
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\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```\n/**\n * @param {string[]} req_skills\n * @param {string[][]} people\n * @return {number[]}\n */\nconst smallestSufficientTeam = (req_skills, people) => {\n  const n = req_skills.length;\n  const skillToId = req_skills.reduce((map, skill, index) => {\n    map[skill] = 1 << index;\n    return map;\n  }, {});\n  const dp = new Map().set(0, []);\n\n  for (let i = 0; i < people.length; i++) {\n    const personSkills = people[i].reduce((bitmap, skill) => bitmap | skillToId[skill] || 0, 0);\n    for (const [skillSet, team] of dp.entries()) {\n      const newSkillSet = skillSet | personSkills;\n      if (!dp.has(newSkillSet) || dp.get(newSkillSet).length > team.length + 1) {\n        dp.set(newSkillSet, [...team, i]);\n      }\n    }\n  }\n\n  return dp.get((1 << n) - 1);\n};\n\n```
['JavaScript']