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 The function path returns non-zero if there exist any path from root to leaf has a path length of 10.
Otherwise return zero. Find B and A with the recursive calls of path?
a) A is path(x -->left, len-1) || path(x--> right, len-1), B is (len=0)
b) A is path(x -->left, len-1) || path(x--> right, len-1), B is (len=-1)
c) A is path(x -->left, len-1) || path(x--> right, len-1), B is (len=1)
d) A is path(x -->left, len) || path(x--> right, len), B is (len=1)