class Solution:
def reconstructQueue(self, people: List[List[int]]) -> List[List[int]]:
people.sort(key = lambda x: (-x[0], x[1]))
que = []
for p in people:
que.insert(p[1], p)
return que
class Solution:
def findMinArrowShots(self, points: List[List[int]]) -> int:
points.sort(key = lambda x : x[1])
count = 0
ed = float('-inf')
for p in points:
if ed < p[0]:
count += 1
ed = p[1]
return count