
I wish to move backwards – lets say im in “Backgrounds” node. Then i wish to move:
->backgrounds
->component 6
->components
->assembly 3
->component 5
->component 4
->components
->assembly 2
->component 3
...
can anyone help me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since my comment was helpful I’m posting this answer.
What you want is called a Rightmost traversel in postorder. You can do it recursively like this:
You can read more about tree traversal methods here: Tree traversal