Practice Problem

Non-overlapping Intervals

Difficulty: Medium

Given an array of intervals, return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.