題目
代碼
class Solution:
def findMinArrowShots(self, points):
"""
:type points: List[List[int]]
:rtype: int
"""
count = 0
i = 0; j = 0
end = 0
points = sorted(points, key = lambda x: x[1])
while i < len(points) and j < len(points):
if i == 0:
end = points[i][1]
count += 1
elif points[i][0] > end:
end = points[i][1]
count += 1
i += 1
return count