Exforsys

Online Training

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 ...


Go Back   Exforsys > Programming Talk > Java

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-12-2006, 05:40 AM
Junior Member
 
Join Date: Feb 2006
Posts: 12
seenu01 is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2007, 09:13 AM
Senior Member
 
Join Date: Apr 2006
Posts: 139
Ralph is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2007, 09:38 AM
Senior Member
 
Join Date: Apr 2006
Posts: 141
Adrian is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-07-2007, 09:44 AM
Member
 
Join Date: Apr 2006
Posts: 98
Angela is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-07-2007, 09:51 AM
Senior Member
 
Join Date: Apr 2006
Posts: 125
ashlee is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Building an Ajax Memory Tree in Oracle Application Express JobHelper Oracle Tutorials 0 12-03-2006 12:37 PM
Traversing Composites with Visitors Anthony Webster Software Patterns 2 10-11-2003 11:44 AM


All times are GMT -4. The time now is 08:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.