Exforsys
Results 1 to 5 of 5

Recursive Tree Traversing

This is a discussion on Recursive Tree Traversing within the Java forums, part of the Programming Talk category; I need help on Recursive Tree Traversing in Java. I would really appreciate if anyone among you explain it along ...

  1. #1
    seenu01 is offline Junior Member Array
    Join Date
    Feb 2006
    Answers
    11

    Recursive Tree Traversing

    I need help on Recursive Tree Traversing in Java.
    I would really appreciate if anyone among you explain it along with examples code (if possible).

    Thanks in advance
    Seenu

  2. #2
    Ralph is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    114
    There are various methods of implementing the recursive tree traversing. One of the methods is by using the stack method. This method is used for maintaining the state of the traversal for every level of a tree.

  3. #3
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    One more way I could suggest for implementing recursive tree traversing is by using link structure that is in particular by using child-parent link

  4. #4
    Angela is offline Banned Array
    Join Date
    Apr 2006
    Answers
    84
    Ralph it was quite right about your explanation on stack usage for implementing recursive tree traversing. I want to know whether some more ways of implementing recursive tree traversing. Can you give guidelines on those.

  5. #5
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108
    Yes adrain its a good suggestion. The structure of using child-parent link is used for returning the pointer back to the parent level after traversing the child level. By this method we can eliminate the need for a separate stack object. That's a good suggestion. I am going this out in program.

    •    Sponsored Ads