heapq λž€?

import heapq
Β 
νž™ 자료ꡬ쑰 μƒνƒœλ‘œ λ§Œλ“€μ–΄μ€€λ‹€
Β 
import heapq // μ΄ˆκΈ°ν™” heap = [] heapq.heapify(heap) // 자료 μΆ”κ°€μ‹œ μžλ™ μ˜€λ¦„μ°¨μˆœμœΌλ‘œ 정렬ꡬ쑰λ₯Ό κ°–λŠ”λ‹€ heap.heappush(heap,22) // [77] heap.heappush(heap,77) // [22,77] heap.heappush(heap,33) // [22,33,77] //제거 ν›„ 리턴 heap.heappop(heap) //22 heap //[33,77]
λŒ“κΈ€ 0개

λ“±λ‘λœ λŒ“κΈ€μ΄ ν•˜λ‚˜λ„ μ—†μŠ΅λ‹ˆλ‹€...😒