binarytreetest.cpp

来自「包含各种测试,查找和算法等代码,如冒泡算法,树的遍历,链表,队列,堆栈等」· C++ 代码 · 共 25 行

CPP
25
字号
#include <conio.h>
#include "BiTreeLib.h"
#include "BiTreeExample.h"

void main(void)
{
	BiTreeNode<char> *root1, *root2;

	MakeCharTree(root1, 1);
	MakeCharTree(root2, 2);
	cout << "root1树为:" << endl;
	PrintTree(root1, 0);
getch();
	cout << "root2树为:" << endl;
	PrintVTree(root2);
	cout << "\nroot2树后序遍历结点次序为: ";
	Postorder(root2, Printchar);
	int leafCount = 0;
	CountLeaf(root2, leafCount);
	cout << "\nroot2树的叶子结点个数为: " << leafCount;
getch();
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?