Optimal Interval Difference

Asked at Amazon · Coding & Leetcode-style Questions · Difficulty: Medium

In the Optimal Interval Difference problem, you are given an array of intervals, where each interval is represented as `[start[i], end[i]]`. Your task is to find the minimum difference between the start and end points of the common overlapping intervals. That is from the set of intervals obtained after merging the overlapping intervals, compute the difference between the start `[i-1]` and end `[i]` points for each interval after sorting and return the minimum of those differences.

Loading the problem…