PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Optiver

Simulate satellite message propagation with timing

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to design data structures and algorithms for graph-based event-driven simulations, testing competencies in graph algorithms, concurrent timed propagation, event ordering, and online processing within the Coding & Algorithms domain.

  • Medium
  • Optiver
  • Coding & Algorithms
  • Software Engineer

Simulate satellite message propagation with timing

Company: Optiver

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Design and implement the SatelliteNetwork to process a stream of N instructions: - SatelliteConnected(SatelliteId): add a satellite; invoke ErrDuplicateSatellite(SatelliteId) if the satellite connects more than once. - RelationshipEstablished(SatelliteId1, SatelliteId 2): add a bidirectional link; if either SatelliteId does not exist, skip the instruction and invoke ErrInvalidSatellite(the invalid id). - MessageReceived(M, id1..idM): treat the listed M satellites as simultaneously notified at time t = 0. Propagation rules: - A satellite forwards the message to each direct neighbor that has not yet been notified, one neighbor at a time, in increasing SatelliteId order; each send takes exactly 10 seconds. - Different satellites may concurrently attempt to notify the same neighbor; each attempt still consumes 10 seconds, but as soon as any attempt completes, that neighbor is considered notified and no further attempts to it should proceed. - A satellite never attempts to notify the satellite that notified it. Post-notification processing: - After all of its direct neighbors have been notified, a satellite spends 30 seconds processing the message and then reports back to Earth. Reporting: - Call OnSatelliteReportedBack(SatelliteId) at each satellite’s report completion time; if two reports complete at the same time, report the smaller SatelliteId first. Task: Provide data structures and an algorithm that consume the instruction stream online and trigger OnSatelliteReportedBack calls in the correct order for any input, handling duplicates/invalid references as specified. Explain your approach and analyze time and space complexity.

Quick Answer: This question evaluates a candidate's ability to design data structures and algorithms for graph-based event-driven simulations, testing competencies in graph algorithms, concurrent timed propagation, event ordering, and online processing within the Coding & Algorithms domain.

Related Interview Questions

  • Find missing numbers in sequences - Optiver (hard)
  • Design a circular queue data structure - Optiver (medium)
  • Optimize flight and cargo bookings for profit - Optiver (hard)
  • Compare two programs for equivalence - Optiver (Medium)
  • Design a satellite propagation simulator - Optiver (Medium)
Optiver logo
Optiver
Jul 17, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
3
0

Design and implement the SatelliteNetwork to process a stream of N instructions:

  • SatelliteConnected(SatelliteId): add a satellite; invoke ErrDuplicateSatellite(SatelliteId) if the satellite connects more than once.
  • RelationshipEstablished(SatelliteId1, SatelliteId 2): add a bidirectional link; if either SatelliteId does not exist, skip the instruction and invoke ErrInvalidSatellite(the invalid id).
  • MessageReceived(M, id1..idM): treat the listed M satellites as simultaneously notified at time t = 0. Propagation rules:
  • A satellite forwards the message to each direct neighbor that has not yet been notified, one neighbor at a time, in increasing SatelliteId order; each send takes exactly 10 seconds.
  • Different satellites may concurrently attempt to notify the same neighbor; each attempt still consumes 10 seconds, but as soon as any attempt completes, that neighbor is considered notified and no further attempts to it should proceed.
  • A satellite never attempts to notify the satellite that notified it. Post-notification processing:
  • After all of its direct neighbors have been notified, a satellite spends 30 seconds processing the message and then reports back to Earth. Reporting:
  • Call OnSatelliteReportedBack(SatelliteId) at each satellite’s report completion time; if two reports complete at the same time, report the smaller SatelliteId first. Task: Provide data structures and an algorithm that consume the instruction stream online and trigger OnSatelliteReportedBack calls in the correct order for any input, handling duplicates/invalid references as specified. Explain your approach and analyze time and space complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 7,500+ 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.