Check if x is present at root or in left subtree or right subtree .
if ( ( root -> data == x ) || ( dist = findDistance ( root -> left , x ) ) >= 0 || ( dist = findDistance ( root -> right , x ) ) >= 0 ) return dist + 1 ; return dist ; }