Find every set in a hand of Set cards
Each card in the game Set has four attributes (color, shape, number, shading), and each attribute takes one of three values, so a card is four numbers from 0 to 2. Three cards form a set when, for every attribute, the three values are either all the same or all different. Given a list of cards, return every set.
Start with the direct triple loop, then use the fact that any two cards determine the third card that completes them.
No answer yet. Write the first one; the best answer gets endorsed.
