public Node meld(Node node1, Node node2) {

		if(node1 == null && node2 == null)
			return null;
		else if(node1 != null && node2 == null) {
			rootMin = node1;
			return node1;
		}
		else if(node1 == null && node2 != null) {
			rootMin = node2;
			return node2;
		}
		else {
			Node temp1 = node1.getNextNode();
			Node temp2 = node2.getNextNode();
			node1.setNextNode(temp2);
			node2.setNextNode(temp1);
			temp2.setPrevNode(node1);
			temp1.setPrevNode(node2);
				
			if(node1.getData() < node2.getData()) {
				rootMin = node1;
				return node1;
			}
			else {
				rootMin = node2;
				return node2;
			}
		}
		 
	}