Hey there, I ran into a bad test case when submitting a solution to this problem:
Input: [[-52,31],[-73,-26],[82,97],[-65,-11],[-62,-49],[95,99],[58,95],[-31,49],[66,98],[-63,2],[30,47],[-40,-26]]
Expected Output: 7
but the expected output should be 8.
If we sort it, we can see that there are 8 intervals to be removed:
[[-73, -26], [-65, -11], [-63, 2], [-62, -49], [-52, 31], [-40, -26], [-31, 49], [30, 47], [58, 95], [66, 98], [82, 97], [95, 99]]