This is the Poker problem in one of previous year's final. See question here
I attempted most questions in the problem and have attached my worksheets, and here's my question:
Does anyone have any good idea how to best solve ties between two pairs?
8C 8D 7S 5S 5C
9C 8S 8H 5H 5D
Here's my idea:
step 1: rank the five cards (solved in part 1)
step 2: Since there're two pairs in five cards, there must be a pair in the first three cards, and another pair in the last three cards. We can use the Mode function to find the two pairs
step 3: if both pairs are equal, we can just do a high card rank for all the cards in order to break ties.
What do you think is the best way to do it?
I attempted most questions in the problem and have attached my worksheets, and here's my question:
Does anyone have any good idea how to best solve ties between two pairs?
8C 8D 7S 5S 5C
9C 8S 8H 5H 5D
Here's my idea:
step 1: rank the five cards (solved in part 1)
step 2: Since there're two pairs in five cards, there must be a pair in the first three cards, and another pair in the last three cards. We can use the Mode function to find the two pairs
step 3: if both pairs are equal, we can just do a high card rank for all the cards in order to break ties.
What do you think is the best way to do it?