Given an array of intervals, return the minimum number of intervals you need to remove to make the rest non-overlapping.
Example 1:
Input: 4 1 2 2 3 3 4 1 3 Output: 1
Input format: Line 1 = n. Next n lines = start end.
Given an array of intervals, return the minimum number of intervals you need to remove to make the rest non-overlapping.
Example 1:
Input: 4 1 2 2 3 3 4 1 3 Output: 1
Input format: Line 1 = n. Next n lines = start end.