
C language; data structure
birthdog
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二叉树
[code="c"] #include"stdio.h" #include"malloc.h" typedef struct Tree { char ch; struct Tree *left; struct Tree *right; }Tree; typedef struct Stack { Tree *data; struct Stack *next;...原创 2013-03-06 16:11:23 · 135 阅读 · 0 评论 -
带头结点非循环单链表
[code="c"] #include"stdio.h" #include"malloc.h" typedef struct Node { int data; Node *next; }Node; void InitNode(Node *&p) { p = (Node *)malloc(sizeof(Node)); p->next = NULL; } ...原创 2013-02-05 14:35:27 · 140 阅读 · 0 评论 -
带头结点非循环双向链表
[code="c"] #include"stdio.h" #include"malloc.h" typedef struct DNode { int data; DNode *prior, *next; }DNode; void InitDNode(DNode *&p) { p = (DNode *)malloc(sizeof(DNode)); p->prio...原创 2013-02-05 15:55:22 · 241 阅读 · 0 评论 -
链栈(1)
[img]http://my.iteye.com/admin/picture/123306[/img] [code="c"] #include"stdio.h" #include"malloc.h" typedef struct Node { int data; Node *next; }Node; void InitStack(Node *&top) { ...原创 2013-02-05 16:49:43 · 192 阅读 · 0 评论 -
链队(1)
[code="c"] #include"stdio.h" #include"malloc.h" typedef struct LNode { int data; LNode *next; }LNode; typedef struct { LNode *front; LNode *rear; }Queue; void InitQueue(Queue *...原创 2013-02-05 23:08:06 · 166 阅读 · 0 评论 -
循环队列
[code="c"] #include"stdio.h" #include"malloc.h" #define MAX 7 typedef struct{ int queue[MAX]; int front; int rear; }Queue; void InitQueue(Queue *&q) { q = (Queue *)malloc(sizeof(Q...原创 2013-02-07 20:36:58 · 129 阅读 · 0 评论