Staff Consultants to Client Project Roles by Skill Matching
Last updated: November 29, 2026
Quick Overview
Given client projects that each list open roles with one required skill, and consultants who each have a set of skills and can take at most one role, assign consultants to maximise the number of filled roles and report which roles stay open.
Thoughtworks
November 29, 20260
0
0 solved
Given client projects that each list open roles with one required skill, and consultants who each have a set of skills and can take at most one role, assign consultants to maximise the number of filled roles and report which roles stay open.
Staffing people onto client engagements is a real operational problem for a consultancy, which makes it a natural framing for a harder algorithm question. The interviewer checks that you recognise maximum bipartite matching, see why greedy fails, and implement augmenting paths efficiently.
What the Interviewer Expects
- Models roles and consultants as a bipartite graph
- Shows a counterexample where greedy assignment is suboptimal
- Implements augmenting paths (Kuhn or Hopcroft-Karp) correctly
- Returns both the assignment and the unfilled roles
- States complexity and when Hopcroft-Karp matters
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
- Some consultants can split time across two projects. How does the model change?
- Roles have priorities and consultants have preferences. Which algorithm would you use?
- How would you minimise travel or rolling off people from current projects?
- How would you explain the result to a staffing manager?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Slots are (project, index, skill). A consultant can fill a slot if they have the skill. Each consultant fills at most one slot, each slot at most one consultant. Maximise filled slots....
High-Level Design
Greedy fails: if Ana (java, react) takes the bank java role first, the react role may have nobody left if Chen is needed for spark. Maximum matching fixes this by finding augmenting paths that reassig...