next | next | up | down | Inhalt | Kommentar

all, section 6.10.

6.10.  Recursions on Binary Trees

There are many natural algorithms on binary trees that could be described recursivly. The scheme for recursions on binary trees is suggested in the following figure:

Procedure recursive_on_tree( node n)

[picture]

Examples:

Action = print the label of the node

Examples:

Traverse the tree in (in | post | pre)-order


back | next | up | down | Inhalt | Kommentar


Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 22/May/97