the function get_lca which give lca of two number
in this question sir you not cover 1 case if p and q is qual
than the answer is number p or q
what to do for this case
Lca question of binary tree
since both p == q
then u can return either
p or q
so that will not be a problem
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.