
数据结构
小小蜗牛
这个作者很懒,什么都没留下…
展开
-
栈的数组实现
#include #include typedef struct { int *array; int size; int top; }stack; /* function:initial the stack with the size input:stack *s, int size output:void */ void ini原创 2013-01-21 21:42:36 · 490 阅读 · 0 评论 -
用链表实现队列
#include #include typedef char elemType; typedef struct Node { elemType data; struct Node *next; }QueueNode; typedef struct queueList { QueueNode *front; QueueNode *rear; }Queu原创 2013-03-25 22:40:33 · 700 阅读 · 0 评论 -
单链表的实现
#include #include typedef struct list { int data; struct list *next; }List; /* function:初始化为带表头的单链表 input:void output:List型指针 */ List *initList(void) { List *L = (Li原创 2013-01-21 21:44:35 · 611 阅读 · 0 评论