452. Minimum Number of Arrows to Burst Balloons (Medium) - TengnanYao/daily_leetcode GitHub Wiki

class Solution(object):
    def findMinArrowShots(self, points):
        """
        :type points: List[List[int]]
        :rtype: int
        """
        points.sort(key = lambda x: x[1])
        count = 0
        end = float("-inf")
        for a, b in points:
            if end < a:
                count += 1
                end = b
        return count