public boolean matchTree(Node<T> root1, Node<T> root2, boolean matchFound){

        if(root1 ==null || root2 ==null){
            matchFound = false;
            return matchFound;
        }

        if(root1.data.compareTo(root2.data) ==0){
            matchFound = true;
            if(root1.left!=null) {
                matchFound= matchFound && matchTree(root1.left,root2.left,matchFound);
            }
            if(root1.right!=null && matchFound) {
                matchFound= matchFound && matchTree(root1.right,root2.right,matchFound);
            }
        }

        return matchFound;

    }