Problem 54149. Determine Poker Hand Winner

Determine the poker hand winner from two hands of cards (each hand will contain the same number of cards between five and thirteen cards each). Output shoud be 0 - for tie, 1 - for hand1 winner, 2 - for for hand 2 winner. Card hands will be provided as a table like the following:
hand=table([9 3 10 7 13 12 11]',[3 2 3 4 3 3 3]');
hand.Properties.VariableNames={'value','suit'};
where card value is listed first: 2:10,jack,queen,king,ace == 1:13 and suits are listed second: clubs, diamonds, hearts, spades == 1:4. Note: (A 2 3 4 5) is considered a straight where the A acts low, therefore the kicker would be 5.

Solution Stats

50.0% Correct | 50.0% Incorrect
Last Solution submitted on Apr 04, 2022

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers3

Suggested Problems

More from this Author54

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!