⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 在各种各样的搜索算法中
💻 CPP
字号:
#include"avltree.h"
void main()
{
	try
	{
		AVLtree<int> s;
	    cout<<"'I' stand for insert ,'D' stand for delete!"<<endl;
		char q;
		do
		{
			
			cout<<"please select ?I/D"<<endl;
			cin>>q;
			if(q=='i')
			{
				int m;
				cout<<"please enter the data you want to insert!"<<endl;
				cin>>m;
				s.Insert(m);
				cout<<"the tree is:"<<endl;
				s.output();
			}
			else if(q=='d')
			{
				int n;
				cout<<"please enter the data you want to delete!"<<endl;
				cin>>n;
				s.Delete(n);
	        	s.output();
			}
		}while(q!='q');
		
	}
	catch(...){}
}

⌨️ 快捷键说明

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