Consider the following function with a binary tree with atleast one node:
int path(struct node *x, int len){
if(x==NULL) return B;
else return A;
}
Assume the above function is used “to check the given binary tree has any path with specified length from root to the leaf node”. Let $T$ be a binary tree with root pointed by $x.$ The function path $(x,10)$ returns non-zero if there exists any path from root to leaf has a path length $10.$ Otherwise returns $0$. Find $B$ and $A$ with recursive call of path?
$(1)$ $A$ is $path(x->left,len-1)||path(x->right,len-1)$ ,$B$ is $(len==1)$
$(2)$ $A$ is $path(x->left,len-1)||path(x->right,len-1)$ ,$B$ is $(len== -1)$
which of these two option correct? Please Explain.