""


:

. :

1) ( , ) : A, B, C ;

2) : B, A, C ;

3) ( ) : B, C, A .

2- , .

:

1) PROCEDURE pretrave (tree)

IF tree<>nil

THEN PRINT info (tree)

pretrave (left (tree))

pretrave (right (tree))

END IF

RETURN

2) PROCEDURE intrave (tree)

IF tree<>nil

THEN intrave (left (tree))

PRINT info (tree)

intrave (right (tree))

END IF

RETURN

3) PROCEDURE postrave (tree)

IF tree<>nil

THEN postrave (left (tree))

postrave (right (tree))

PRINT info (tree)

END IF

RETURN