Python data engineering interview problem. Difficulty: advanced. Pattern: Sorting. About 20 minutes. Part of the Pro drill bank.
Maintenance windows are intervals on a timeline. Overlapping windows should merge so the calendar shows one closed period instead of three stacked ones.
Merge overlapping maintenance intervals.
Input: merge_windows([[1, 3], [2, 6], [8, 10]]) Output: [[1, 6], [8, 10]] This input follows the stated rules and produces this output.
Topics: lakebench, python, sorting.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Merge a list of overlapping maintenance time windows into the minimal set of non-overlapping windows.
Merge overlapping maintenance intervals.