private void consolidateHeap(){
		int noOfDiffDegrees = ((int) Math.floor(Math.log(numOfNodes) * inverseGoldenRatioFibonacci)) + 1; /// get the logic of the array size
		
		// This array contains the Root nodes in the order of their degrees. For eg : Root node of degree 2 is stored at location 2 of the array.
		FHeapNode[] degreeArray = new FHeapNode[noOfDiffDegrees];

		for(int count=0 ; count < noOfDiffDegrees ; count++){
			degreeArray[count] = null;
		}

		// Find the number of root nodes in the fibonnaci heap
		int noOfRootNodes = noOfRootNodes();		
		FHeapNode x = minNode;	
		
		// Search the degree of each root node
		while(noOfRootNodes > 0){
			int degree = x.degree;
			FHeapNode rightSibling = x.rightSibling;

			// search the degree in the degreeArray
			while(degreeArray[degree] != null){
				// if we are able to locate another root node having same degree as x then merge it with x.
				FHeapNode element = degreeArray[degree];
				
				if(element.key < x.key){
					//exchange x & element
					FHeapNode temp = x;
					x = element;
					element = temp;					
				}
				// Link the two nodes having the same degree.
				linkTwoNodes(element,x);
				
				degreeArray[degree] = null;
				degree ++;
			}
			// Since no matching node was found of this degree , save this node for future reference
			degreeArray[degree] = x;
			
			// Move to the next available node
			x = rightSibling;
			noOfRootNodes --;
		}
		
		// reconstruct the Heap from the elements present in the degreeArray
		minNode = null;
		
		for(FHeapNode newNode : degreeArray){
			if(newNode != null){
				if(minNode == null){
					minNode = newNode;
				}else{
					// Delink the node from its left & right siblings
					newNode.leftSibling.rightSibling = newNode.rightSibling;
					newNode.rightSibling.leftSibling = newNode.leftSibling;
					
					// Link the nodes in the new root list
					addNodeToRootNode(newNode);
					
					// Update the minimum pointer of the Fibonacci heap , if the key of the new element is less than the key of the current minimum pointer
					if(newNode.key < minNode.key){
						minNode = newNode;
					}

				}				
			}
		}
	}