Skip to content

Commit db667f5

Browse files
committed
中序遍历改为后序遍历
1 parent f3a597e commit db667f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/chapTree.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ \section{二叉树的遍历} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1818

1919
树的先根遍历是:先访问树的根结点,然后依次先根遍历根的各棵子树。树的先跟遍历的结果与对应二叉树(孩子兄弟表示法)的先序遍历的结果相同。
2020

21-
树的后根遍历是:先依次后根遍历树根的各棵子树,然后访问根结点。树的后跟遍历的结果与对应二叉树的中序遍历的结果相同
21+
树的后根遍历是:先依次后根遍历树根的各棵子树,然后访问根结点。树的后跟遍历的结果与对应二叉树的后序遍历的结果相同
2222

2323
二叉树的先根遍历有:\textbf{先序遍历}(root->left->right),root->right->left;后根遍历有:\textbf{后序遍历}(left->right->root),right->left->root;二叉树还有个一般的树没有的遍历次序,\textbf{中序遍历}(left->root->right)。
2424

0 commit comments

Comments
 (0)