This repository contains a university course project that focuses on implementing a Fibonacci Heap.
- Import the FibonacciHeap class into your Java project.
- Create an instance of the Fibonacci Heap:
FibonacciHeap heap = new FibonacciHeap();
- Use the available methods to interact with the heap. For example:
heap.insert(10); heap.insert(20); System.out.println(heap.findMin()); // Outputs the minimum element
The implementation does not include direct interaction or terminal output but provides return values from the methods for verification. Example outputs:
findMin()
:System.out.println(heap.findMin()); // Output: HeapNode with the minimum key
countersRep()
:int[] ranks = heap.countersRep(); System.out.println(Arrays.toString(ranks)); // Output: Array of ranks of trees in the heap
size()
:System.out.println(heap.size()); // Output: Number of elements in the heap