Reported September 2026
Expediadynamic programming

Smallest Sufficient Team

Reported by candidates from Expedia's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Expedia OA. Under 2s to a working solution.
Founder's read

The Expedia OA reported in September 2026 hands you a skills list capped at 16 and up to 60 people, and asks for the smallest team that covers every skill. That 16 is the whole hint. It screams bitmask dynamic programming. The twist is the tiebreak: if several minimum teams exist, you return the lexicographically smallest increasing index list. Most people solve the size part and fumble the tie. If you've got an invite sitting in your inbox, this is the one to understand before you open the editor. StealthCoder is the invisible backup if your head goes blank mid-assessment.

The problem

Given a list of distinct required skills and the skills held by each person, return indices of a smallest team whose combined skills cover every required skill.
If several minimum-size teams exist, return the lexicographically smallest increasing index list. Every input has at least one sufficient team.

Function
smallestSufficientTeam(requiredSkills: String[], peopleSkills: String[][]) → int[]

Examples
Example 1
requiredSkills = ["java","sql","aws"]
peopleSkills = [["java"],["sql"],["aws"],["java","sql"]]
return = [2,3]
Case 1 exercises the documented deterministic contract.
Example 2
requiredSkills = ["a"]
peopleSkills = [["a"]]
return = [0]
Case 2 exercises the documented deterministic contract.
Example 3
requiredSkills = ["a","b"]
peopleSkills = [["a"],["b"],["a","b"]]
return = [2]
Case 3 exercises the documented deterministic contract.

Constraints
1 <= requiredSkills.length <= 16.
1 <= peopleSkills.length <= 60.
Skill names are case-sensitive; unrequired skills may be ignored.

Reported by candidates. Source: FastPrep

Pattern and pitfall

Map each required skill to a bit, so each person becomes a mask. Then run DP over masks from 0 to 2^n - 1, where dp[mask] holds the best team (a list of indices) that covers exactly that set of skills. For each person, compute newMask = mask | personMask and update dp[newMask] if the candidate team is smaller, or equal size and lexicographically smaller. The pitfall is the tiebreak. Process people in increasing index order and compare the full lists on ties, don't just trust the first one found. Also skip people with a zero mask, and ignore skills that aren't required. With 60 people and 65,536 masks, the work is small. If the lexicographic comparison tangles you up during the live OA, StealthCoder is the safety net that can show a clean comparison on screen without the proctor seeing it.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Smallest Sufficient Team cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as smallest sufficient team. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Expedia's OA.

Expedia reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Smallest Sufficient Team FAQ

What's the trick in Smallest Sufficient Team?+

Turn each skill into a bit and each person into a bitmask. Then DP over all skill subsets, storing the smallest team that reaches each subset. The limit of 16 required skills is what makes 2^16 states fine. Recognize that and the problem is mostly bookkeeping.

How do I handle the lexicographically smallest tiebreak?+

When two teams for the same mask have equal size, compare the index lists element by element and keep the smaller one. Iterate people in ascending index order so lists stay increasing. Don't assume the first minimum found is the smallest lexicographically, check it explicitly.

How hard is this really for an Expedia OA?+

It's a hard-tier problem on paper, but the pattern is standard once you spot the 16-skill cap. The code is short, around 25 lines. The risk is the tiebreak and off-by-one errors in mask building, not the core idea.

What's the time and space complexity?+

About O(2^n * m) time, with n required skills and m people, so roughly 65,536 times 60 transitions at the max. Space is O(2^n) states, each storing a list of at most n people. Comfortable for the stated constraints.

How do I prepare in 48 hours?+

Write the bitmask DP from scratch once, using this problem's examples. Then test the edge cases: one skill, one person, a person with no useful skills, and a tie between two same-size teams. Focus on getting the tiebreak right rather than reading more problems.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Expedia.

OA at Expedia?
Invisible during screen share
Get it