https://docs.python.org/2/library/heapq.html 여기껄 클래스화시켰다. 큐의 순서는 출력해보면 알겠지만 우선순위에 따라서 출력된다.# -*- encoding: cp949 -*- from heapq import * class priority_queue(): def __init__(self): self.pq = [] # list of entries arranged in a heap self.entry_finder = {} # mapping of tasks to entries self.REMOVED = '' # placeholder for a removed task def put(self, task, priority=0): 'Add a new task or update the ..