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
-
Remove any row in which a NaN appears
8209 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1474 Solvers
-
1201 Solvers
-
Test if a Number is a Palindrome without using any String Operations
219 Solvers
-
182 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!