带索引的二叉搜索树讲义.doc

带索引的二叉搜索树 //file:indexedBSTree.h #pragma once #include BSTree.h templatetypename E,typename K class IndexedBSTree : public BSTreeE,K { public: void Create(); bool Search(const K k,E e)const; bool IndexSearch(int k,E e)const; IndexedBSTreeE,K Insert(const E e); IndexedBSTreeE,K Delete(const K k,E e); IndexedBSTreeE,K IndexDelete(int k,E e); void Ascend(); void IndexOutput(); private: static void OutputLeftSize(BinaryTreeNodeE *t); }; templatetypename E,typename K void IndexedBSTreeE,K::Create() {//产生一个空的带索引的二叉搜索树 root = 0; } templatetypename E,typename K bool IndexedBSTreeE,K:

文档评论(0)

1亿VIP精品文档

相关文档