This question evaluates understanding of interval overlap detection and time-window optimization, testing skills in interval algorithms and temporal data handling within the Coding & Algorithms domain.
During the technical screen, candidates must implement interval algorithms used in fraud-detection pipelines to reconcile overlapping user activity windows.
Given a list of login sessions for a single user, each as [start_time, end_time], determine if any sessions overlap. 2. If overlaps exist, return the minimal set of session IDs to remove so that the remaining sessions are non-overlapping while maximizing total covered time.
Sort intervals, track previous end; greedy removal similar to ‘Non-overlapping Intervals’.