Non-overlapping Intervals

Given a collection of intervals, return the minimum number of intervals to remove to make the rest non-overlapping.

Examples
Input: [[1,2],[2,3],[3,4],[1,3]]
Output: 1
Hints

Non-overlapping Intervals

Given a collection of intervals, return the minimum number of intervals to remove to make the rest non-overlapping.