随笔分类 -  大话数据结构读书笔记

有序表查找优化算法
摘要:#include #include int Swquential_Search(int *a, int n, int key){ int i; a[0] = key; i = n; while(a[i] != key) { i--; } return i;} 阅读全文
posted @ 2013-04-27 17:45 纯洁的坏蛋 阅读(162) 评论(0) 推荐(0)
c语言栈Stack简单实现
摘要:#include #include #define MAX_SIZE 5typedef struct Stack{ int top; int data[MAX_SIZE];}Stack;Stack* initStack(){ Stack *s = (Stack *)malloc(sizeof(Sta... 阅读全文
posted @ 2013-04-26 20:44 纯洁的坏蛋 阅读(589) 评论(0) 推荐(0)
c语言新建双循环链表/遍历
摘要:Node *create(){ DoubLink *list; Node *p, *pNew, *pHead; pHead = (Node *)malloc(sizeof(Node)); pHead->next = NULL; pHead->prior = NULL;//第一个节点 p = pHea... 阅读全文
posted @ 2013-04-25 15:15 纯洁的坏蛋 阅读(271) 评论(0) 推荐(0)
c语言版创建单循环链表
摘要:Node *create(){ int n = 20; Node *pNew, *pTail, *pHead; pHead = (Node *)malloc(sizeof(Node)); pHead->next = pHead;//空链表 自己指向自己 pTail = pHead; //pTail... 阅读全文
posted @ 2013-04-25 13:51 纯洁的坏蛋 阅读(614) 评论(0) 推荐(0)
C语言单链表创建,插入,删除
摘要:#include #include typedef struct Node{ int data; //数据域 Node *next; //指针域,指向下一个Node节点}Node;Node *create(); //创建一个单链表int deleteFromList(Node *linkList, ... 阅读全文
posted @ 2013-04-25 11:43 纯洁的坏蛋 阅读(424) 评论(0) 推荐(0)