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