Minimum Number of Arrows to Burst Balloons

Each balloon is an interval [start,end]. An arrow shot at x bursts all balloons with start <= x <= end. Return the minimum number of arrows needed.

Examples
Input: [[10,16],[2,8],[1,6],[7,12]]
Output: 2
Hints

Minimum Number of Arrows to Burst Balloons

Each balloon is an interval [start,end]. An arrow shot at x bursts all balloons with start <= x <= end. Return the minimum number of arrows needed.