Minimum Number of Arrows to Burst Balloons

There are balloons on a 2D wall represented by horizontal diameter intervals. Given `points[i] = [x_start, x_end]` for each balloon, return the minimum number of arrows to burst all balloons. **Pattern focus:** Greedy by End Time. Focus on interval overlap.

Examples

Example 1:

Input:

points = [[10,16],[2,8],[1,6],[7,12]]

Output:

2

Explanation:

Shoot arrows at x=6 and x=11 to burst all balloons.

Example 2:

Input:

points = [[1,2],[3,4],[5,6],[7,8]]

Output:

4

Explanation:

No balloons overlap; need one arrow per balloon.

Loading...
Minimum Number of Arrows to Burst Balloons