- 博客(6)
- 资源 (7)
- 收藏
- 关注
原创 stack栈
#include#includetemplateclass Stack{ int top; //栈顶指针(下标) T *elements; //动态建立的栈 int maxSize; //栈最
2008-01-25 00:49:00 393
原创 shell排序
#include using namespace std;void shell(int arr[],int count);void main(){ int arr[]={40,38,4,16,21,99,83,15,44,66}; shell(arr,10);}void shell(int arr[],int count){ int increment=c
2008-01-18 09:54:00 271
原创 二分查找
#include using namespace std;void shell(int arr[],int n,int x);//n为数组个数,x为被查找数int main(){ int arr[]={5,8,10,13,15,19,21,30,45,48}; shell(arr,10,8);}void shell(int arr[],int n,int x){
2008-01-18 09:51:00 233
原创 单向链表
#include using namespace std;//templatestruct Node{ int c; Node *next,*prev; Node(int num,Node *pre=0,Node * nex =0):c(num),prev(pre),next(nex){}};class List{public: List():head(0),tail(0){} void
2008-01-15 20:10:00 291
原创 引用计数
//reference counting#include using namespace std;class String{public: String(const char *initValue=""); String(const String& rhs); ~String(); String& operator=(const String & rhs); cons
2008-01-08 02:20:00 281
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人