Smallest Lark Project Team Covering Every Required Skill

Last updated: November 29, 2026

Quick Overview

Given up to 16 required skills and a list of people each with a set of skills, return the indexes of a smallest group whose combined skills cover every requirement, or None if impossible.

ByteDance
Coding & Algorithms
Software Engineer
ByteDance
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

0

0 solved


Given up to 16 required skills and a list of people each with a set of skills, return the indexes of a smallest group whose combined skills cover every requirement, or None if impossible.

Lark (Feishu) project tooling can suggest staffing for a new initiative from employees' skill profiles. The problem is set cover, which is NP-hard in general, so the interviewer is checking whether you notice the small number of skills and switch to a bitmask DP that is exponential only in skills, not people.

What the Interviewer Expects
  • Notice the small skill count and encode skill sets as bitmasks
  • Run a DP over covered-skill masks keeping the smallest team per mask
  • Iterate over a snapshot of states to avoid using one person twice in an update
  • Skip people who add nothing
  • Discuss pruning dominated people
Key Topics to Cover
bitmask dynamic programming
set cover
subset enumeration
optimization
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you prune people whose skill set is a subset of someone else's?
  • What if each person also has a cost and you minimize total cost?
  • What would you do if there were 200 required skills?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Inputs: req_skills, a list of up to 16 distinct strings, and people, a list where each entry lists that person's skills (unknown skills are ignored). Output: a list of person indexes with minimum ...

High-Level Design

Map each skill to a bit. Each person becomes a mask. best[mask] stores the smallest team found whose union is exactly mask. Process people one at a time and, for every state known before this pers...


Submit Your Answer
Markdown supported