随笔分类 -  数据结构之链栈

摘要:#include<iostream>#include<stdio.h>#include<malloc.h>#include<string.h>#include<stdlib.h>#define maxsize 100using namespace std;typedef struct node{ c 阅读全文
posted @ 2017-03-22 16:26 mykonons 阅读(1088) 评论(0) 推荐(0)
摘要://将12345依次入栈,取栈顶元素,将6,7入栈,求栈中元素个数,将7出栈,将6出栈,将5出栈,最后全部出栈依次输出 #include<iostream>#include<stdio.h>#include<malloc.h>#include<stdlib.h>#define maxsize 100 阅读全文
posted @ 2017-03-22 15:32 mykonons 阅读(12893) 评论(0) 推荐(0)
摘要:/*设置一个静态变量记链表值的个数入栈是头插法 */#include<stdio.h>#include<stdlib.h>#include<malloc.h>static int count=0;typedef struct node{ int data; struct node *next;}st 阅读全文
posted @ 2016-09-13 04:34 mykonons 阅读(172) 评论(0) 推荐(0)