Here is the solution:
function findMinArrowShots(points)
if points is empty then
return 0
sort points by end coordinate
arrows := 1
arrowPos := points[0].end
for i from 1 to length - 1
if points[i].start > arrowPos then
arrows := arrows + 1
arrowPos := points[i].end
return arrows
Time: . Space: .
If the current balloon starts after our arrow position, we need a new arrow. Otherwise, the current arrow already bursts it.