Problem 54149. Determine Poker Hand Winner
Solution Stats
Problem Comments
-
8 Comments
Our differences on the first 100 winds by each player are these:
1) hand #142 was awarded to player 1. But player 1 has nothing, while player 2 has 2 pair, so player 2 should have won.
2) hand #219 was awarded to player 1. But player 1 has a pair of 12's, while player 2 has 2 pair, so player 2 should have won.
Both hand1{142} and hand1{219} are straights with the ace coming down to function low (A 2 3 4 5}. I should have noted that in the rules since some poker games do not allow that, but many also do.
Thanks David, that fixed it. I never actually played poker, so I had to look up the rules. There are a lot of varieties!
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
2382 Solvers
-
Matrix indexing with two vectors of indices
728 Solvers
-
1295 Solvers
-
Matrix with different incremental runs
517 Solvers
-
USC Fall 2012 ACM : Code Word Minimum Flipped Bits
19 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!