Re: All paths through a tree



Blaine wrote:
Given a tree like:

(77 (237 (228 (234 (231 266) 266)) (234 (231 266) 266)))


Can you explain what makes this a tree? (as opposed to a list of lists)
What is the single data structure that makes it a tree?( what is a node)
Is a node of the tree a tree itself?

Define these terms and you can design traversal algorithm.


I would like to list all the paths from the source node to the terminal
nodes:

((77 237 228 234 231 266)
(77 237 228 234 266)
(77 237 234 231 266)
(77 237 234 266))

I've been struggling with this for a few days now, and I just can't get
it to work. Does anyone have any ideas? Anywhere to look for code for
manipulating trees?

Thanks, Blaine

.