← Questions
Deal five-card poker hands and pick the winners
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Players sit in a fixed order and cards are dealt round-robin from a given sequence until everyone holds five. Cards are written as a rank (2 to 9, T, J, Q, K, A) and a suit.
- Simulate the deal and record which player got which card.
- Classify every hand with the standard poker categories, from straight flush down to high card, and compare hands within a category by their ranks.
- Return the winner, or every player tied for the best hand.
Keep the hand ranking easy to change, since the interviewer adds rules as you go.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
