
链表
文章平均质量分 78
路漫漫之大神之养成
请多多指教!!!
展开
-
链表的基本操作
# include # include struct list{ int num; struct list * next;};typedef struct list node;typedef node * link;void printlist(link head); //输出 链表 link creatlist(int原创 2016-04-01 13:22:24 · 442 阅读 · 0 评论 -
栈——链表实现
# include # include # include typedef struct NODE // 创建结点的结构体 { int data; struct NODE *next;}node,*pnode;typedef struct STRACK //创建头指针和尾指针的结构体 { pnode ptop; pnode原创 2016-04-01 13:23:12 · 531 阅读 · 0 评论 -
二叉树--链表实现
# include # include typedef struct TREE{ char data; struct TREE * lchild; struct TREE * rchild;}Tree, * ptree;void init_tree(ptree &root); //初始化二叉树 void creat_tree(ptree &root); //创建二叉树原创 2016-04-03 15:33:18 · 2294 阅读 · 0 评论 -
约瑟夫环--链表实现
# include # include //# define n 21//# define m 3typedef struct Node{ int data; struct Node * next;}NODE,*pnode;typedef struct linklist{ pnode phead; pnode ptail; int len;}LINK,*plink;原创 2016-04-01 15:03:08 · 536 阅读 · 0 评论 -
链表——数组实现
# include # include # include typedef struct ARR{ int * pbase; //数据域 int len; //数组长度 int cnt; //有效个数 }Arr,*parr;void init(parr arr,int lengh); //创建数组 bool原创 2016-04-01 13:21:42 · 448 阅读 · 0 评论