최소 힙(Min Heap)을 사용해 우선순위 큐(Priority Queue) 구현class PriorityQueue { constructor() { this.minHeap = []; } enqueue(value, priority) { this.minHeap.push({ value, priority }); this.heapUp(); } dequeue() { if (this.size() === 0) return null; if (this.size() === 1) return this.minHeap.pop(); const min = this.minHeap[0]; this.minHeap[0] = this.minHeap.pop(); this.heapDown();..