Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- def findMinArrowShots(self, points: List[List[int]]) -> int:
- points.sort()
- res = 0
- pos = float("-inf")
- for a, b in points:
- if a > pos:
- res += 1
- pos = b
- else:
- pos = min(pos, b)
- return res
Advertisement
Add Comment
Please, Sign In to add comment