排序的九种算法

#include<iostream>#include <iomanip>#include <string>#include<deque>using namespace std;const int MAXSIZE=20;class node {public: void operator =(node b); int key; char info;};void node::operator=(node b){ key=b.key; info=b.info; }struct Sqlist{ node data[MAXSIZE+1]; int length;};class Sort{priva...
数据结构 | 2010-12-27 16:16 | 阅读 603 次 | 评论 2 条

二叉树

#include <iostream>#include <deque>#include <stack>using namespace std; struct BSTNode{ int data; BSTNode * LChild,* RChild;};class BST{private: BSTNode *T;public: ~BST(); BSTNode * GetRoot(); void BSTCreate(); void BSTInsert(BSTNode *); int BSTDepth(BSTNode *);//求树的深度 递归 void Depth();//树的深度 ...
数据结构 | 2010-12-24 16:48 | 阅读 435 次 | 评论 0 条
文章归档