Back to problems

Valid Set Cards

Algorithm · Snapchat · Medium

You are asked to implement validation for a Set-style card rule. A card is represented as a row of feature values, and the cards argument is a list of such rows. A candidate group is valid exactly when, for every feature position considered separately, either all selected cards have the same value at that position or all selected cards have different values at that position. A single feature position may not mix equal and unequal values among the selected cards. The function…

Checking your access…