points
array based on the end coordinate of the balloons in ascending order.arrows
to 1, as we need at least one arrow to start with.first_end
to the end coordinate of the first balloon in the sorted array.points
array starting from the second balloon.
first_end
, it means we need a new arrow.
arrows
by 1.first_end
to the end coordinate of the current balloon.arrows
as the minimum number of arrows needed.