택시짱의 개발 노트

python heapq 모듈 본문

python

python heapq 모듈

택시짱 2020. 9. 8. 16:41

python에서 제공해주는 heapq 이라는 모듈이 있습니다.

 

heapq는 우리가 보편적으로 알고 있는 우선순위 큐 (priority_queue)을 제공해준다고 생각하면 되겠습니다.

 

 

heapq.heapify()
heapq.heappush()
heapq.heappop()
heapq.heappushpop()
heapq.heapreplace()
heapq.merge()
heapq.nlargest()
heapq.nsmallest()
반응형

'python' 카테고리의 다른 글

Python 기본 개념 공부..  (0) 2020.11.22
python으로 Trie 구현 with defaultdict  (0) 2020.09.08
python 입력 받기  (0) 2020.08.31
python Context manager  (0) 2020.07.18
ubuntu에서 git bash 설치하기  (0) 2020.07.15
Comments