FastPrepUnexplained Sightings Outside Flight Intervals
Problems/Unexplained Sightings Outside Flight Intervals

Unexplained Sightings Outside Flight Intervals

MobileCoin logoMobileCoin● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The flight-coverage task matches the report at about 85%. The report specifies HHMM departure times, durations in minutes, half-open coverage, no overnight flights, and at least one unexplained sighting; returning every uncovered observation in input order, duplicate handling, and input bounds are practice assumptions.

You have flight records and times when objects were observed in the sky. Each flight is [departure, duration]: departure is an integer HHMM clock time, and duration is a number of minutes.

A flight covers the half-open interval from departure through, but excluding, landing. For example, [1655,10] covers 16:55 through 17:05, excluding 17:05. No flight lands after midnight.

An observation is unexplained when its time is outside every flight interval. The input guarantees at least one unexplained observation.

  • For this exercise, assume the result contains every unexplained observation in the same order as observations, retaining repeated occurrences.
  • For this exercise, assume unsorted, overlapping, touching, and repeated flight records are valid; any covering flight explains an observation.
  • For this exercise, assume all clock values are valid same-day times, durations are positive, and a flight may land exactly at midnight.

Return the unexplained observation values in the original integer HHMM format. For example, 09:00 is represented as 900.

Function

unexplainedSightings(flights: int[][], observations: int[]) → int[]

Examples

Example 1

flights = [[900,10],[1030,40],[1655,10]]observations = [900,910,1109,1110,1654,1655,1705]return = [910,1110,1654,1705]

A departure is covered, while its landing is excluded unless another flight covers it.

Example 2

flights = [[1000,20],[950,20],[1015,10]]observations = [1025,1005,949,950,1024]return = [1025,949]

Overlapping flights jointly cover 09:50 through 10:25, excluding 10:25. Input observation order is retained.

Example 3

flights = []observations = [2359,0,2359]return = [2359,0,2359]

Without flights every observation is unexplained, including both occurrences of 23:59.

Constraints

  • For this exercise, assume 0 <= flights.length <= 500 and 1 <= observations.length <= 1000.
  • Each flight contains exactly two integers: its departure HHMM and duration in minutes.
  • Clock hours are in [0,23] and minute fields in [0,59].
  • 1 <= duration <= 1440, and departure in elapsed minutes plus duration is at most 1440.
  • At least one observation is outside all flight intervals.

Similar questions at other companies

  • Query Weekly Store Opening HoursApple · PHONE SCREENApple interview questions
  • Batch Point-in-Range QueriesGoogle · PHONE SCREENGoogle interview questions
  • Classify Heap Addresses from a Memory SnapshotSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Maximum Profit in Job SchedulingAmazon · PHONE SCREEN
  • Maximum Event Value with an Attendance LimitSnowflake · PHONE SCREENSnowflake interview questions
  • Maximum Interactive Team SizeMicrosoft · OAMicrosoft interview questions
  • Closed Interval Overlap QueriesNetflix · ONSITE INTERVIEWNetflix interview questions
  • Maximum Team SizeExpedia · OAExpedia interview questions
  • Employee With the Most OverlapsCitadel · OACitadel interview questions
  • Log Analyzer: Busiest Service in a Rolling WindowByteDance · PHONE SCREENByteDance interview questions
See MobileCoin hiring insights
Saved
class Solution {
    public int[] unexplainedSightings(int[][] flights, int[] observations) {
        // Write your code here.
        return new int[0];
    }
}
Checking account…