Skip to main content
Medium Greedy Medium frequency

Minimum Number of Arrows to Burst Balloons

Open on LeetCode

Approach Summary

Sort by end. Shoot an arrow at the first balloon's end. Skip all overlapping balloons. Repeat — each overlap group needs one arrow.

How to Recognize This Pattern

  • "Minimum arrows to pop all overlapping intervals"
  • Greedy: one arrow at the earliest end covers all overlapping

Complexity Analysis

Time Complexity

O(n log n)

Space Complexity

O(1)

Tags

Array Greedy Sorting

This site is free. If these guides are helping your prep, consider buying me a coffee. ☕

Support →
Buy me a coffee