Windows can overlap or be nested: a long pass from one station may still be running when a shorter one from another station ends. If you only look at the previous window, you think contact was lost when it wasn't. latest_end remembers the furthest end seen so far.
Comments 5
Join the discussion CommentAlready have an account? Log in
Windows can overlap or be nested: a long pass from one station may still be running when a shorter one from another station ends. If you only look at the previous window, you think contact was lost when it wasn't.
latest_endremembers the furthest end seen so far.That's exactly my bug — a short window inside a long one. Fixed.
Classic interview question too, by the way.
This "merge intervals" pattern shows up everywhere: meeting rooms, server outages, etc.
Usuda is JAXA's deep-space station. The station list is a nice touch.