All subsets
Three cards lie on the table. Which hands can you take away? Find them all, including leaving empty-handed.
For each card, leave it or take it. Bracketed indices distinguish cards with equal values.
Each card doubles the possibilities. There are exactly 2ⁿ hands for n cards, including the empty hand.
Writing all subsets takes O(n·2ⁿ) time. Try up to eight cards in the player to see up to 256 subsets.