예제 #1
0
 private void BuildHeap(MinHeap minHeap, MaxHeap maxHeap, int n)
 {
     if (maxHeap.IsEmpty() || n <= maxHeap.Peek())
     {
         maxHeap.Offer(n);
     }
     else
     {
         minHeap.Offer(n);
     }
 }