Implement Concurrent Any-True Shot
Company: Temporal
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates proficiency in concurrent programming, focusing on coordination, synchronization, early termination, and best-effort cancellation when racing multiple asynchronous boolean-returning calls.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([(1,5,False),(2,2,True),(3,9,False)],)
Expected Output: True
Explanation: A true shot exists.
Input: ([],)
Expected Output: False
Explanation: No shots.
Input: ([(1,1,False),(2,3,False)],)
Expected Output: False
Explanation: All false.
Hints
- Choose a representation that makes the requested operation direct.
- Handle empty inputs and boundary cases first.