This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Ameya Deoras
on 21 Jul 2017
The second part of Test 3 looks incorrect. This problem has two straight flushes on rows 2 & 3. However, the expected solution only shows a straight flush on row 2
hm = [0 0 0 0 0 0 0 0 1 1 0 1 1
1 0 0 0 0 0 0 0 0 1 1 1 1
1 1 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical([0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0])
assert(isequal(isStraightFlush(hm),y_correct))
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!