//Create a class to create the tree class Node{ protected int info; protected Node left; protected Node right; //Constructor public Node(){ info=0; right=null; left=null; } //Function to set Data public void setInfo(int i){ info=i; } //Other function to get left and right child and to set them. }//end of node class //Function to check for validity of expression public boolean validate(int inArr[],int preArr[],int len) { boolean Flag=true; for(int i=0;i