Determine Straight Flush
Company: Pinduoduo
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Technical Screen
Quick Answer: This question evaluates competency in algorithmic pattern detection and data-structure manipulation applied to domain-specific representations, focusing on identifying ordered sequences and uniform attributes within a set of items.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([('10','Hearts'),('J','Hearts'),('Q','Hearts'),('K','Hearts'),('A','Hearts'),('3','Clubs')],)
Expected Output: True
Explanation: High-ace straight flush.
Input: ([('A','Spades'),('2','Spades'),('3','Spades'),('4','Spades'),('5','Spades')],)
Expected Output: True
Explanation: Ace can be low.
Input: ([('2','Spades'),('3','Spades'),('4','Spades'),('5','Spades'),('7','Spades')],)
Expected Output: False
Explanation: Missing one rank prevents a straight flush.
Hints
- Clarify edge cases before coding.
- Keep the return value deterministic.