Balloons are drawn on a wall as horizontal segments [x_start, x_end]. An arrow shot straight up at position x bursts every balloon with x_start <= x <= x_end. Return the fewest arrows that burst all balloons.
For [[10, 16], [2, 8], [1, 6], [7, 12]] the answer is 2.
Example 1
Input:
min_arrows([[10, 16], [2, 8], [1, 6], [7, 12]])
Output:
2
Example 2
Input:
min_arrows([[1, 2], [3, 4], [5, 6], [7, 8]])
Output:
4
0 <= len(points) <= 200000-10**9 <= x_start < x_end <= 10**9No results yet
Run your code to check it against the examples, or submit to run every test.