Why cant i apply recursion : over it


#1

I know it says recursion is not allowed, but then too i tried to do it.
and it shows me weird result, are u guys able to apply recursion over it, so i could check if i am the only one doing something wrong in my recursion or it is something internal


#2

Recursion in Trees is usually applied when you want to access same node again or you want to access both left and right nodes but this question can be solved by just using a loop because you have to choose between left or right node. So ideally recursion is not required.

I have tried recursion and it works as well. Only thing is runtime is higher than loop.