static void Main(string[] args) { IntFibonacciHeap heap = ReadFile("input.txt"); if (heap != null && !heap.IsEmpty()) { ProcessHeap(heap); } WriteFile(heap, "output.txt"); }
private static void ProcessHeap(IntFibonacciHeap heap) { heap.ExtractMin(); IntFibonacciHeap secondHeap = ReadFile("input2.txt"); if (secondHeap != null && !secondHeap.IsEmpty()) { secondHeap.ExtractMin(); heap.Union(secondHeap); } //Console.WriteLine(heap.GetMinNode().Key); //Console.WriteLine(heap.GetMinNode().Key); //heap.DecreaseKey(heap.GetMinNode(), 1); //Console.WriteLine(heap.GetMinNode().Key); //heap.Delete(heap.GetMinNode()); }