프로그래머스: 단속 카메라 (python)


프로그래머스: 단속 카메라 (python)

from collections import deque def solution(routes): answer = 0 # 먼저 빠져나가는 순서대로 정렬 routes.sort(key=lambda a : a[1]) # 만약 route[i][1] 번째 있는 것을 고른다 rqueue = deque(routes) while rqueue: x, y = rqueue.popleft() answer +=1 if not rqueue: break while rqueue: if rqueue[0][0]

프로그래머스: 단속 카메라 (python)에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.


원문링크 : 프로그래머스: 단속 카메라 (python)