Schedule Ground Station Passes to Maximize Downlinked Data
Last updated: November 29, 2026
Quick Overview
A ground station with one antenna has candidate satellite passes, each with a start time, end time and the megabytes it could downlink. Choose non-overlapping passes that maximize total data downlinked and return the chosen passes.
Spacex
November 29, 20260
0
0 solved
A ground station with one antenna has candidate satellite passes, each with a start time, end time and the megabytes it could downlink. Choose non-overlapping passes that maximize total data downlinked and return the chosen passes.
Starlink and Starshield ground segments must decide which satellite each gateway antenna tracks when passes conflict. In a SpaceX-style onsite the interviewer wants weighted interval scheduling with dynamic programming, plus reconstruction of the actual schedule rather than only the number.
What the Interviewer Expects
- Explain why greedy by earliest end or by largest value fails on weighted passes
- Sort by end time and define dp over prefixes
- Use binary search to find the last compatible pass
- Reconstruct the chosen schedule, not only the total
- State O(n log n) time and O(n) space
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How does the problem change with two antennas at the same site?
- Each satellite should be scheduled at most once per day. Can the DP still handle that?
- How would you include a slew time between consecutive passes?
- Passes are partially usable (you can track part of a pass). What algorithm fits then?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Passes (start, end, mb); one antenna; a pass ending at time 10 is compatible with one starting at 10 (assume instant retargeting). Return (total_mb, chosen_passes)....
High-Level Design
Greedy fails: earliest-end can pick a tiny pass that blocks a huge one. Sort by end. Let dp[i] be the best total using the first i passes. Either skip pass i (dp[i-1]) or take it and add `dp[j...