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
-
14898 Solvers
-
4303 Solvers
-
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
173 Solvers
-
Generate a random matrix A of (1,-1)
268 Solvers
-
Sum of first n positive integers
548 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!