摘要: 上网借鉴人家的,并没有进行测试。#ifndef AVLTree_H#define AVLTree_Htemplate<typename T>class AVLTree{ AVLTree(); AVLTree(const AVLTree & rhs); ~AVLTree(); const T & findMin() const; const T & findMax() const; bool contains(const T & x) const; bool isEmpty() const; void printTree() const; void m 阅读全文
posted @ 2013-02-12 11:48 中大黑熊 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 新年到!中大黑熊祝大家新年快乐!在这里,po上二叉查找树的比较全的实现,我自己整理的,没有测试过,希望有错的能和我说一声,赐教赐教一下我哈!#ifndef BinaryTree_H#define BinaryTree_Htemplate<typename T>struct BinaryNode{ T element; BinaryNode * left; BinaryNode * right; BinaryNode(const T & theElement,BinaryNode *lt = NULL,BinaryNode *rt = NULL):element(theEle 阅读全文
posted @ 2013-02-12 00:27 中大黑熊 阅读(1342) 评论(0) 推荐(0) 编辑