FastPrepStarlink Beam Planner
Problems/Starlink Beam Planner

Starlink Beam Planner

SpaceX logoSpaceX● HardFULLTIMENEW GRADOAPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a SpaceX online assessment. The source image shows the original Starlink Beam Planner rules for geometry, capacity, interference between four frequencies, the coverage threshold, and the output you build. Our function takes an assignment matrix that works in every language, says where indexes and colors start, and sets input limits. It accepts every plan that works, even if there is more than one. Our version is about 94% the same as the reported question.

You are given the positions of users and satellites as three-dimensional vectors relative to the center of a spherical Earth at (0, 0, 0). Construct a set of satellite beams that serves at least minimumServed distinct users.

Function Contract

Implement planBeams. Return an integer matrix in which every row is [userIndex, satelliteIndex, color]:

  • userIndex and satelliteIndex are zero-based.
  • color is one of 1, 2, 3, or 4.
  • The order of the returned rows does not matter.

Your assignment must satisfy all of the following rules:

  • One beam per user: a user may appear in at most one returned row.
  • User visibility: for user vector U and satellite vector S, the angle between U and S - U must be at most 45 degrees.
  • Satellite capacity: one satellite may serve at most 32 users.
  • Frequency separation: consider two users assigned to the same satellite. If their beams use the same color, the angle between the vectors from that satellite to the two users must be at least 10 degrees.
  • Coverage: the matrix must contain at least minimumServed rows.

Any assignment satisfying these rules is accepted. It does not have to equal the reference output shown in an example, and it may serve more than minimumServed users.

Function

planBeams(users: double[][], satellites: double[][], minimumServed: int) → int[][]

Examples

Example 1

users = [[1,0,0],[0,1,0]]satellites = [[2,0,0],[0,2,0]]minimumServed = 2return = [[0,0,1],[1,1,1]]
Example 1 illustration

User 0 is directly below satellite 0, and user 1 is directly below satellite 1. Both users are served, so the minimum of 2 is met.

Example 2

users = [[1,0,0],[0.996194698,0.087155743,0]]satellites = [[2,0,0]]minimumServed = 2return = [[0,0,1],[1,0,2]]

The two beams are less than 10 degrees apart at satellite 0, so the reference plan gives them different colors. Any other feasible colors are also accepted.

Example 3

users = [[1,0,0],[0,1,0]]satellites = [[2,0,0]]minimumServed = 1return = [[0,0,1]]

User 0 is visible from the satellite. Serving that user alone satisfies minimumServed = 1; user 1 may be omitted.

Constraints

  • 1 <= users.length <= 500
  • 1 <= satellites.length <= 100
  • Every user and satellite entry contains exactly three finite coordinates.
  • Every user and satellite vector is nonzero, and every coordinate has absolute value at most 10^9.
  • 0 <= minimumServed <= users.length
  • At least one valid assignment serves minimumServed users.

More SpaceX interview questions

  • DNA Sequence MatchOA · Seen Apr 2025
  • Timestamped Telemetry Stream DifferencesPHONE SCREEN · Seen Sep 2026
  • Number of IslandsPHONE SCREEN · Seen Aug 2026
  • Number of Islands IIPHONE SCREEN · Seen Aug 2026
  • Button Combination DetectorPHONE SCREEN · Seen Feb 2026
  • Rocket Component CostONSITE INTERVIEW · Seen Aug 2025
  • Pressure Chamber Linear InterpolationPHONE SCREEN · Seen Jun 2025
  • Speed to Pressure LookupPHONE SCREEN · Seen Mar 2025
  • Simplified Time-Based Key-Value StorePHONE SCREEN · Seen Nov 2023
  • Find the Duplicate NumberONSITE INTERVIEW · Seen Jan 2021

Similar questions at other companies

  • Maximize K-Element AND with an Increment BudgetAmazon · OA
  • Split Array to Minimize the Largest SumInfosys · OAInfosys interview questions
  • Split Array Largest SumAuxoAI · OA
  • Delete and Freeze GameRubrik · OARubrik interview questions
  • Lock CodeVisa · OAVisa interview questions
  • Most Segments That Sort the ArrayRippling · OARippling interview questions
  • Greedy Person-Cake Matching DistanceSnowflake · PHONE SCREENSnowflake interview questions
  • Split Array to Minimize the Largest SumNation with NaMo · PHONE SCREEN
  • Max Points on a LineUber · PHONE SCREENUber interview questions
  • Maximize Fish over Limited HoursByteDance · PHONE SCREENByteDance interview questions

Interview reports that mention this question

  • Cursor, SpaceX and xAI New Grad Interviews: 15 Experiences
  • 2013–2026 SpaceX Full-Time OA / Interviews: 45 Experiences (Part 2 :)
  • SpaceX Software Engineer OA and Interviews: 27 Experiences
  • SpaceX Starlink Software Engineer Assessment: 1 Experience
  • SpaceX Starlink Backend Engineer OA: 1 Experience
  • SpaceX Starlink Full-Stack Engineer Phone Screen: 1 Experience
All SpaceX interview questionsSee SpaceX hiring insights
Saved
class Solution {
    public int[][] planBeams(double[][] users, double[][] satellites, int minimumServed) {
        // Write your code here.
    }

}
users[[1,0,0],[0,1,0]]
satellites[[2,0,0],[0,2,0]]
minimumServed2
reference[[0,0,1],[1,1,1]]
Checking account…