Content deleted Content added
No edit summary |
Clarified intro by relating to computer science. |
||
Line 1:
In [[computer science]], '''tree traversal''' is the process of visiting each node in a [[tree data structure]]. Tree traversal provides for sequential processing of each node in what is, by nature, a non-sequential data structure.
Such traversals are characterised by the order in which the nodes are visited.
The following algorithms
Say we have a tree node structure which contains a value <code>value</code> and references <code>left</code> and <code>right</code> to its two children. Then we can write the following function:
|