Cody

# Problem 840. SET (the card game)

Solution 1677191

Submitted on 20 Nov 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
cards = [1 0 1 0 1 1 1 1 2 2 1 0 0 1 2 2 2 1 1 1 1 0 1 2 0 0 0 0 2 2 2 2 0 2 0 0 1 1 1 0 0 1 0 2 0 2 0 2]; sets_correct = [2 7 8 6 8 11]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11 sets = 2 7 8 6 8 11

2   Pass
cards = [1 2 2 1 1 2 1 2 2 0 2 2 1 2 2 2 1 1 1 2 1 0 0 2 1 1 2 1 2 1 0 0 0 2 2 1 2 2 0 0 0 0 1 1 0 1 1 0]; sets_correct = [2 9 10 4 5 6 4 8 11]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11 sets = 2 9 10 4 5 6 4 8 11

3   Pass
cards = [2 2 2 0 2 2 1 1 1 0 1 1 2 2 0 1 0 1 2 1 1 1 0 1 0 0 1 2 1 2 0 0 1 0 1 0 1 2 1 1 1 0 2 1 1 0 2 2]; sets_correct = [1 5 12 1 6 7 3 4 5 6 10 11]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 1 5 12 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 4 5 sets = 1 5 12 1 6 7 3 ...

4   Fail
cards = [0 1 2 0 0 1 2 1 1 2 0 1 1 2 0 2 0 0 0 0 1 1 1 1 1 1 1 2 1 1 0 2 2 2 1 1 2 2 2 0 2 0 0 0 1 1 0 0]; sets_correct = []; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix

Assertion failed.

5   Pass
cards = [0 1 2 0 0 1 2 1 1 2 0 1 1 2 0 2 0 0 0 0 1 1 1 1 1 1 1 2 1 1 0 2 2 2 1 1 1 0 0 1 2 1 0 1 2 2 2 2]; sets_correct = [1 7 11 2 6 11 2 9 10 4 5 11 5 6 12]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2 9 10 4 5 11 5 6 12 sets = 1 7 11 2 6 11 2...

6   Pass
cards = [1 2 2 0 0 2 0 1 2 2 1 2 2 0 1 0 2 1 0 2 2 0 1 2 2 1 2 2 0 1 1 1 1 1 2 2 2 0 0 2 0 2 1 1 2 2 2 1]; sets_correct = [1 2 3 1 8 10 2 4 9 3 7 10 4 5 12]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 4 5 12 sets = 1 2 3 1 8 10 2 4 9 3 7 10 ...

7   Pass
cards = [1 0 1 0 1 1 1 1 2 2 1 0 0 1 2 2 2 1 1 1 1 0 1 2 0 0 0 0 2 2 2 1 0 2 0 0 1 1 1 0 0 1 0 2 0 2 0 2]; sets_correct = [1 8 11]; sets = findSETs(cards); assert(isequal(size(sets),size(sets_correct))) for i=1:size(sets_correct) assert(ismember(sets_correct(i,:),sets,'rows')) end

sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 0×3 empty double matrix sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11 sets = 1 8 11