FastPrepTimestamped Telemetry Stream Differences
Problems/Timestamped Telemetry Stream Differences

Timestamped Telemetry Stream Differences

SpaceX logoSpaceX● EasyFULLTIMEPHONE SCREEN
QuestionFunctionExamplesConstraints

Problem statement

Source note: The report directly identifies subtraction of two telemetry streams, timestamps present in only one stream, and nondecreasing timestamp order. The aligned-array adapter makes those preserved facts executable and matches the coding task at about 96%.

Two telemetry streams contain aligned integer samples. Only the first stream supplies timestamps, in nondecreasing order. Arrays leftValues and rightValues contain the aligned measurements for those timestamps.

Return one row [timestamp, leftValue - rightValue] for every sample, preserving input order.

Function

telemetryDifferences(timestamps: int[], leftValues: int[], rightValues: int[]) → int[][]

Examples

Example 1

timestamps = [10,20,30]leftValues = [7,4,9]rightValues = [2,6,3]return = [[10,5],[20,-2],[30,6]]

Subtract aligned values and retain the timestamp from the first stream.

Example 2

timestamps = [5]leftValues = [-3]rightValues = [4]return = [[5,-7]]

Negative differences are retained.

Example 3

timestamps = [1,1,2]leftValues = [5,8,6]rightValues = [5,3,9]return = [[1,0],[1,5],[2,-3]]

Nondecreasing timestamps may repeat and every aligned sample is emitted.

Constraints

  • 1 <= timestamps.length <= 10^5.
  • All three arrays have the same length.
  • Timestamps are nondecreasing and every difference fits a signed 32-bit integer.

More SpaceX problems

  • Starlink Beam PlannerOA · PHONE SCREEN · Seen Nov 2026
  • Number of IslandsPHONE SCREEN · Seen Aug 2026
  • Number of Islands IIPHONE SCREEN · Seen Aug 2026
All SpaceX interview questionsSee SpaceX hiring insights
Saved
class Solution {
    public int[][] telemetryDifferences(int[] timestamps, int[] leftValues, int[] rightValues) {
        // Write your solution here.
    }
}
Checking account…