This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/ex9/ex9.cpp

26 lines
434 B
C++
Raw Normal View History

2021-12-02 16:09:43 +00:00
#include <iostream>
#include "BST.hpp"
int main()
{
printf("初始化\n");
BST bst(31);
2021-12-03 07:33:31 +00:00
printf("========层次遍历========\n");
2021-12-02 16:09:43 +00:00
bst.trav_level();
2021-12-03 07:33:31 +00:00
printf("\n========先序遍历========\n");
bst.trav_pre();
printf("========中序遍历========\n");
bst.trav_in();
printf("========后序遍历========\n");
bst.trav_post();
printf("高度为%d\n",bst.height());
2021-12-17 08:38:06 +00:00
2021-12-02 16:09:43 +00:00
return 0;
}