正在加载图片...
Template <class Type> class bst: Binary Tree i public BSTO: root(NULL)( BST(Type value): Refvalue( value), root(NULD)&) BStOIMake Empty root); const bst& operator=( const bst& Tree void MakeEmpty( int Find( const Type &x)const f return Find(x, root)==NULL:; j Type Min() Type Max() void Insert( const Type & x)( Insert(x, root);) void remove( const Type &x) Remove( x, root);) BstNode< Type>* Split( Type i, BST<Type>& b pe &x, bst<type>&c) 20212222021/2/22 19 Template <class Type> class BST : BinaryTree // { public: BST ( ) : root ( NULL ) { } BST ( Type value ) : RefValue(value) , root(NULL) { } ~BST ( ) { MakeEmpty( root ) ;} const BST & operator = ( const BST & Tree ) ; void MakeEmpty( ) ; int Find( const Type & x ) const { return Find( x , root ) == NULL ; } Type Min( ) ; Type Max( ) ; void Insert( const Type & x ) { Insert( x , root ) ; } void Remove( const Type & x ) { Remove( x , root ) ; } BstNode<Type> * Split( Type i, BST <Type> & B , Type & x , BST<Type> & C );
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有