Given an array of intervals
, where each interval is represented as intervals[i]
=[li,ri) (indicating the range from li to ri, inclusive of li and exclusive of ri), remove all intervals that are completely covered by another interval in the list. Return the count of intervals that remain after removing the covered ones.
Note: An interval [a,b) is considered covered by another interval [c,d) if and only if c<=a and b<=d.
Constraints:
1<= intervals.length
<=1000
intervals[i].length
==2
0<=li<ri<=105
All the given intervals are unique.