virtualvinodh
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Tree Recursion
in PHP Coding Help
Posted
Hi,
I wrote a piece of code for doing a recursive printing of all the leaf nodes.
But it is not moving beyond one or two levels.
Here is the code:
The output I get is:
inside loop of paa
inside loop of adi1
inside loop of cir1
inside loop of 0
0==>aka
inside loop of 1
1==>ra
inside loop of 2
2==>vinodh
inside loop of 3
3==>dkido
It does not seem to visit the other nodes.
Anything I missed here ?
V