资 源 简 介
1 编写采用二叉链表形式存储的二叉树的创建、先序、中序、后序和按层遍历的算法。
2 编写将一棵二叉树的所有左右子树进行交换的算法。
提示:验证是否交换可以调用二叉树的遍历算法,比较输出结点序列。
3 编写一个主函数,将上面函数连在一起,构成一个完整的程序。
4 调试并运行实验源程序。
-Prepared using a binary list stored in binary form of the creation, the first sequence, the sequence, after the order and by level traversal algorithms. 2 the preparation of a binary tree will be all about the exchange of sub-tree algorithms. Tip: Verify that the exchange can be called binary tree traversal algorithm to compare the output node sequence. 3 write a main function, the above functions together to form a complete program. 4 debug and run experiments source.