The base case was manageable but the follow-up tripped me up.
Clarify the rules for hand comparison, including handling incomplete hands and the UNKNOWN case. Design a modular evaluator that ranks complete hands and returns UNKNOWN when a winner cannot be determined due to missing cards. Discuss trade-offs between simplicity and extensibility.
Pro tip: Explicitly define what 'incomplete' means and when UNKNOWN applies, as ambiguity here is a common trap. Show you can balance correctness with practical constraints like performance and code clarity.
Ask about hand representation, comparison rules, and the exact conditions for UNKNOWN. Confirm whether incomplete hands can ever win or only lead to UNKNOWN.
Outline a function to evaluate a complete hand's rank (e.g., pair, straight) and compare two hands. For incomplete hands, define logic to detect if a winner is determinable.
Explain how to compare incomplete hands: if one hand's best possible completion cannot beat the other's current best, return the winner; otherwise UNKNOWN. Use examples like 9999 vs 9.
Write modular code with clear separation between evaluation and comparison. Test edge cases: both complete, both incomplete, one complete, and ambiguous scenarios.
Mention performance (e.g., precomputing ranks), extensibility (adding new hand types), and simplicity. Consider if UNKNOWN should be a special return value or exception.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.