Question bank › Backtracking
Dsa Backtracking Easy

Basketball Teams Formation

You are given a list of player skills represented as integers and you need to form teams of a fixed size (team_size). Your task is to find all unique combinations of players that can form teams, ensuring that the sum of skills in each team is at least a required minimum skill level (min_skill). Output your results in ascending order of team composition. Input format: - The first line contains a list of integers representing player skills. - The second line contains an integer representing the team_size. - The third line contains an integer representing the min_skill. Output format: - Print each unique combination of player skills that constitutes a valid team, each on a new line, in ascending order. Example: Input: 1 2 3 4 5 3 6 Output: 2 4 3 3 3 4 2 5 1 5 1 4

Key concepts

backtrackingcombinatoricsrecursion

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.