public static NodeDistance[] setNodeDistance(Node nodes[],BinTree tree){
		int noOfOperands = 0;
		for(int i=0;i<nodes.length;i++)
			if(nodes[i].getCharacter() != '+' && nodes[i].getCharacter() != '*')
				noOfOperands++;
		//System.out.println("No of Operands: "+noOfOperands);
		
		int noOfDistances = combination(noOfOperands,2);
		//System.out.println("No of combinations "+noOfDistances);
		NodeDistance nodeDistance[]=new NodeDistance[noOfDistances];
		int ind = 0;
		for(int i=0;i<nodes.length;i++){
			if(nodes[i].getCharacter()!='*' && nodes[i].getCharacter()!='+'){
				for(int j=i+1;j<nodes.length;j++){
					if(nodes[j].getCharacter()!='*' && nodes[j].getCharacter()!='+'){
						int distance = calculateDistance(nodes[i],nodes[j],tree);
						System.out.println("Distance of "+nodes[i].getCharacter()+" to "+nodes[j].getCharacter()+" is "+distance);
						//System.out.println("Node distance at index "+ind+" and value "+nodeDistance[ind]);
						nodeDistance[ind]=new NodeDistance();
						nodeDistance[ind].setNode1(nodes[i]);
						nodeDistance[ind].setNode2(nodes[j]);
						nodeDistance[ind].setDistance(distance);
						ind++;
					}
					
				}
			}
		}
		return nodeDistance;
		
	}