摘要: 看了半天,还是糊里糊涂,先放这,回过头再看#include#include//求解next[]简化版本void getnext(char p[],int next[]){ int i=0,j=-1,len=strlen(p); next[0]=-1; while(i<len){ ... 阅读全文
posted @ 2015-01-30 22:46 Thereisnospon 阅读(143) 评论(0) 推荐(0)
摘要: #include#includetypedef int type;typedef struct Dnode{ type info; struct Dnode*prior; struct Dnode*next;}dnode;//返回一个建立的双链表头指针,head->next=NUL... 阅读全文
posted @ 2015-01-30 17:43 Thereisnospon 阅读(154) 评论(0) 推荐(0)
摘要: #include#include#includetypedef int type;typedef struct Node{ type info; struct Node*next;}node;//队列声明,保存头指针,尾指针typedef struct{ node *front; ... 阅读全文
posted @ 2015-01-30 17:42 Thereisnospon 阅读(187) 评论(0) 推荐(0)
摘要: #include#includetypedef int type;typedef struct Node{ type info; struct Node*next;}node;//返回一个栈的头指针node*init(){ node*head=(node*)malloc(sizeo... 阅读全文
posted @ 2015-01-30 17:38 Thereisnospon 阅读(114) 评论(0) 推荐(0)
摘要: 链表的基本操作#include#include#includetypedef int type;typedef struct Node{ type info; struct Node *next;}node;//建立一个头节点并将其指针返回node *node_init(){ n... 阅读全文
posted @ 2015-01-30 17:37 Thereisnospon 阅读(115) 评论(0) 推荐(0)