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

📄 mydriver.cp

📁 平衡二叉树的原代码,欢迎使用和下载. 请查收
💻 CP
字号:
#include <iostream>#include <cassert>#include "AVLTree.h"using namespace std;int i;			// used in loopsint SIZE = 10;	// number of testsint main( void){		// tree of ints	AVLTree <int> T;	vector <int> V;			// Try the random-sequence test a bunch of times.  	for( i = 0; i < SIZE; i++ )  	{    	// Insert in decreasing order.    	for( i = 0; i < SIZE; i++ )      	V.push_back( i );    	random_shuffle( V.begin(), V.end() );    	// Insert in a random order.    	for( i = 0; i < V.size(); i++ )    	{      	T.insert( V[ i ] );      	assert( T.contains( V[ i ] ) );    	}    }		// check the constraints of the tree,	//		the balances of the children	T.sanityCheck();		// print the tree to the screen	T.dump();				return 0;}

⌨️ 快捷键说明

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