PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Temporal

Implement Concurrent Any-True Shot

Last updated: Apr 16, 2026

Quick Overview

This question evaluates proficiency in concurrent programming, focusing on coordination, synchronization, early termination, and best-effort cancellation when racing multiple asynchronous boolean-returning calls.

  • medium
  • Temporal
  • Coding & Algorithms
  • Software Engineer

Implement Concurrent Any-True Shot

Company: Temporal

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given a function `shot(index) -> bool`. Each call may take between 1 and 10 seconds to return. Implement `volleyShot(indices) -> bool` for a list of indices. Requirements: - Start multiple `shot` calls concurrently. - Return `True` as soon as any call returns `True`. - Return `False` only after all calls have completed and every call returned `False`. - If the answer is already known, do not keep waiting for slower calls when the runtime allows best-effort cancellation. - If `indices` is empty, return `False`. The focus is on concurrency and early termination.

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.

Temporal logo
Temporal
Apr 3, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
2
0
Loading...

You are given a function shot(index) -> bool. Each call may take between 1 and 10 seconds to return.

Implement volleyShot(indices) -> bool for a list of indices.

Requirements:

  • Start multiple shot calls concurrently.
  • Return True as soon as any call returns True .
  • Return False only after all calls have completed and every call returned False .
  • If the answer is already known, do not keep waiting for slower calls when the runtime allows best-effort cancellation.
  • If indices is empty, return False .

The focus is on concurrency and early termination.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Temporal•More Software Engineer•Temporal Software Engineer•Temporal Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.