Unicorns VO Interview Question: Card Game 4-Card Hand Winning Rules

17 Views
No Comments

Card game

N players randomly draw 4 cards per person.

Winning rule

  • Same color
  • Same number
  • Sequential

This problem describes a 4-card hand evaluation scenario. The key is to check each hand against three winning rules: same color, same number, or sequential values. A clean solution usually separates the logic into independent hand-classification checks, using counting and sorting to verify each rule efficiently. If the task asks for a winner or ranking, the rules should be combined into a clear priority or comparison scheme.

END
 0