Flag Telemetry Dropouts and Altitude Spikes in a Flight Log

Last updated: November 29, 2026

Quick Overview

Given a time-sorted list of (timestamp, altitude) telemetry samples from one flight, report every gap longer than a threshold and every sample whose altitude differs from the median of the previous k accepted samples by more than a spike threshold.

Zipline
Coding & Algorithms
Software Engineer
Zipline
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Medium

0

0

0 solved


Given a time-sorted list of (timestamp, altitude) telemetry samples from one flight, report every gap longer than a threshold and every sample whose altitude differs from the median of the previous k accepted samples by more than a spike threshold.

Zipline aircraft stream telemetry over cellular links that drop out, and sensors occasionally glitch. This screen checks careful stream processing: maintaining a rolling median, deciding what to do with outliers so they do not poison the window, and resetting state after a link gap.

What the Interviewer Expects
  • Clarify whether spikes enter the baseline window
  • Maintain a rolling median efficiently, not by re-sorting each step
  • Reset the baseline after a dropout
  • Explain why median beats mean for glitch detection
  • State behaviour before the window is full
Key Topics to Cover
Rolling median
Stream processing
Outlier detection
Sliding window
Telemetry
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you make the rolling median O(log k) per sample?
  • Samples can arrive slightly out of order; how do you adapt?
  • How would you distinguish a real rapid descent from a sensor glitch?
  • How would you run this across thousands of concurrent flights?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: samples sorted by time. Gap: consecutive timestamps differ by more than max_gap. Spike: once k accepted samples are in the window, a new altitude whose distance from the window median exceeds...

High-Level Design

Keep a FIFO deque of the last k accepted altitudes and a sorted list mirroring it. The median comes from the sorted list in O(1). On accept, pop the oldest from both and insert the new value with `bis...


Submit Your Answer
Markdown supported

Related Questions