452. Minimum Number of Arrows to Burst Balloons
class Solution:
def findMinArrowShots(self, points: List[List[int]]) -> int:
points.sort(key = lambda x : x[1])
answer, end = 1, points[0][1]
for x, y in points:
if x > end:
answer, end = answer + 1, y
return answer
O(NlogN)