;
*; // Left child
*; // Right child
; // Node data
,*;
()
(! = ){
(, ()-> );
(-> );
(-> );
()
(! = ){
(-> );
(, ()-> );
(-> );
()
(! = ){
(-> );
(-> );
(, ()-> );
()
;
(&);
(! =)
(&,);
(! (&))
(&,&);
();
(->! = ){
(&,-> );
(->! = ){
(&,-> );
(&);
;
A is the root of the tree. Then, let's look at the position of the central sequence a. The a in the middle sequence divides the sequence into two parts, dbe and c. Then we can conclude that the left child of a is dbe, And the right child is c. Then, check dbe. In the first order, dbe is in the bde order. B should be the root of the left child of a, so that dbe can be split into d and e by the sequence of B traversing in the middle order. Therefore, the two children of B are d and e. Thus, a definite binary tree can be obtained. No matter what traversal is used, the node sequence of the left child of the tree must be in front of the right child node. This is because the above four traversal types access the left child first and then the right child.
The middle and back order are similar to the latter)
Number of nodes