摘要: 1 链表#include <stdio.h>#include <malloc.h>typedef struct node{ int data; struct node * lchild; struct node * rchild;}node;void Init(node *t){ t = NULL;}node * Insert(node *t , int key){ if(t == NULL) { node * p; p = (node *)malloc(sizeof(node)); p->data = key; p->lchild = NULL; p-&g 阅读全文
posted @ 2011-08-19 12:04 wtx 阅读(916) 评论(0) 推荐(0) 编辑
摘要: 在转自:http://www.cnblogs.com/vongang/ stack//数组实现#include <stdio.h>#include <malloc.h>#define maxsize 10typedef struct{ int data[maxsize]; int top; int base;}seqstack;seqstack * s;void initstack(seqstack * s){ s->top = 0; s->base = 0;}int empty(seqstack * s){ if(s->top == s->ba 阅读全文
posted @ 2011-08-19 11:45 wtx 阅读(871) 评论(0) 推荐(0) 编辑