NOIP (si le) or of the preliminary CSP - the Sequence Number preamble prefix infix suffix

First of all thank the following website and YHP, GSC's Sponsors ......

https://blog.csdn.net/qq_33243189/article/details/80222629

https://blog.csdn.net/xb151652000/article/details/6828756

https://www.cnblogs.com/chensongxian/p/7059802.html

Preamble, in sequence, after traversal

Traversing the binary tree is divided into three types: the preamble, in order, the sequence . Preorder traversal of which the most important.

Why that name? Is The root node named order.

Such as a full node on FIG normal, A: root, B: left node, C: the right node.

Preamble sequence is ABC (first root);

In the BAC sequence is a sequence (in the middle of the root node);

After the order is order BCA (final root).

 

 

For example the result of the binary tree traversal FIG.

Preorder traversal (most from the middle): ABCDEFGHK

Preorder (starting from the left): BDCAEHGKF

Postorder (starting from the bottom left-most): DCBHKGFEA

Prefix, infix, postfix expression

Expression expression prefix, infix expressions, postfix expression of all four operations for four arithmetic expression evaluation

 

 

 

Guess you like

Origin www.cnblogs.com/mzyczly/p/11533332.html