posted 20 years ago
Hi
Can anyone of you help me with the source code for this recursion problem, I will truely appreciate this has been haunting me for some days now.
The problem is, I have 2 fields
Node_id ParentNode
B A
C A
D B
E B
F B
G C
H E
I E
And the list could go on indefinitely. What I want is the output which accepts a Parent_nod (Example A) and lists all the children
{B,C,D,E,F,G,H,I) preferable output will be (B,D,E,H,I,F,C,G List a parent and the childs of that parents)
I know I can solve this with a recursive function but an stuck now
Please help