데이터를 정렬된 상태로 저장하기 위해 사용하는 내장 모듈
우선순위큐
import heapq
원소 추가
heapq.heappush(heap, 4)
삭제
heapq.heappop(heap)
기존 리스트 힙으로
heap = [1, 2, 3, 4] heapq.heapify(heap)
참고 : https://www.daleseo.com/python-heapq/