Problem 333. Poker Series 02: isQuads
Solution Stats
Problem Comments
-
3 Comments
Just checking, maybe I got this wrong but could you try adding this test?:
hm = [1 0 0 0 0 0 0 1 0 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0 0 1
1 0 0 0 0 0 0 1 0 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical(...
[1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0])
I believe several of the current solutions would fail that...
sorry, comments remove formatting, I meant:
hm = [1 0 0 0 0 0 0 1 0 0 0 0 0;1 0 0 0 0 0 0 1 0 0 0 0 1;1 0 0 0 0 0 0 1 0 0 0 0 0;1 0 0 0 0 0 0 1 0 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical([1 0 0 0 0 0 0 0 0 0 0 0 0;1 0 0 0 0 0 0 0 0 0 0 0 1;1 0 0 0 0 0 0 0 0 0 0 0 0;1 0 0 0 0 0 0 0 0 0 0 0 0])
Added the test case. Thank you for the addition.
Solution Comments
Show commentsProblem Recent Solvers88
Suggested Problems
-
374 Solvers
-
Find the largest value in the 3D matrix
1428 Solvers
-
185 Solvers
-
Replace multiples of 5 with NaN
422 Solvers
-
4039 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!