#1230Medium· asked at 3 companies
Minimum Number of Arrows to Burst Balloons
Hosted on LeetCode
Solve it on LeetCode, track it here.
This problem's full statement lives on LeetCode. Open it in a new tab, then come back to mark it solved, add notes and keep your streak.
LeetCode Premium locked?
Most company-tagged LeetCode problems are behind Premium. If you have ChatGPT Plus or Claude Pro, ask it for the full statement, examples and constraints. The buttons below open a chat with the prompt already filled in.
What we know
Example 1
Input: points = [[10,16],[2,8],[1,6],[7,12]] Output: 2
Shoot at x = 6 and x = 11.
Example 2
Input: points = [[1,2],[3,4],[5,6],[7,8]] Output: 4
Example 3
Input: points = [[1,2],[2,3],[3,4],[4,5]] Output: 2
Constraints
- •
1 <= points.length <= 10^5 - •
points[i].length == 2 - •
-2^31 <= xstart < xend <= 2^31 - 1