[Programmers | Level 3] 이중우선순위큐 (Python)
https://programmers.co.kr/learn/courses/30/lessons/42628 코딩테스트 연습 - 이중우선순위큐 programmers.co.kr import heapq def solution(operations): max_heap = [] min_heap = [] for i in operations: a, b = i.split(" ") b = int(b) if a == 'I': heapq.heappush(max_heap, -b) heapq.heappush(min_heap, b) if a == 'D' and b == 1: if not max_heap or not min_heap: continue min_heap.remove(-heapq.heappop(max_heap)) elif a ..