Staff the Maximum Engineers onto Projects by Skill and Seat Limits
Last updated: November 29, 2026
Quick Overview
Each engineer has a set of skills; each open project needs one primary skill and has a fixed number of seats. Assign each engineer to at most one project they qualify for so that the number of staffed seats is maximized.
EPAM Systems
November 29, 20260
0
0 solved
Each engineer has a set of skills; each open project needs one primary skill and has a fixed number of seats. Assign each engineer to at most one project they qualify for so that the number of staffed seats is maximized.
Utilization and bench management are central to a services firm like EPAM, and internal tooling has to match people to open positions. A greedy answer looks right but fails on simple cases, so the interviewer checks that you recognize bipartite matching with capacities and can implement augmenting paths correctly.
What the Interviewer Expects
- Show a counterexample that breaks naive greedy assignment
- Model the problem as bipartite matching where projects have capacity
- Implement augmenting paths (Kuhn style) with a visited set per attempt
- Verify seat limits and skill constraints are never violated
- State complexity and mention max flow as the general tool
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you add a preference score and maximize total preference among maximum matchings?
- How does this map onto a max flow network, and which algorithm would you use at 10k engineers?
- How would you keep assignments stable when one new engineer joins the bench?
- What if a project needs two different skills across its seats?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: engineers: {name: set(skills)} and projects: {id: (skill, seats)}. Output: a map engineer to project, maximizing its size, with each project holding at most seats engineers whose skills i...
High-Level Design
This is maximum bipartite matching where the right side has capacities. Kuhn's algorithm extends naturally: to place engineer e, try each eligible project; if it has a free seat, take it; otherwise tr...