Don’t understand the root->val==p->val, Please tell What we have done in both these and also a doubt like if else(leftans) means then rightans is NULL means q is not present, so we should return null here.
Please explain these 2 ones/
@cbcao263
root and p are nodes
node->val gives int stored in the node
so root->val==p->val means checking for equality of values in nodes
else(leftans) means leftans is not a NULL node