#14Team Formation Possibilities
You are organizing a competition with several participants. Each participant has a unique ID. Given an integer array players containing the IDs of all available players, return every possible team that can be formed.
A team can contain any number of players, including: No players (the empty team) One player Multiple players All available players
Each player can either be included in a team or left out. Return all possible teams. The result must not contain duplicate teams, and the teams may be returned in any order.
Examples
Example 1
Input: players = [4, 7]
Output: [[],[4],[7],[4,7]]
Explanation: There are exactly 4 possible teams.
Example 2
Input: players = [10, 20, 30]
Output: [[],[10],[20],[30],[10,20],[10,30],[20,30],[10,20,30]]
Explanation: There are 2³ = 8 possible teams.
Example 3
Input: players = [-5]
Output: [[], [-5]]
Explanation: --
Constraints
- 1 <= players.length <= 12
- -100 <= players[i] <= 100
- All values in players are unique.
