随笔分类 - 数据结构之链栈
摘要:#include<iostream>#include<stdio.h>#include<malloc.h>#include<string.h>#include<stdlib.h>#define maxsize 100using namespace std;typedef struct node{ c
阅读全文
摘要://将12345依次入栈,取栈顶元素,将6,7入栈,求栈中元素个数,将7出栈,将6出栈,将5出栈,最后全部出栈依次输出 #include<iostream>#include<stdio.h>#include<malloc.h>#include<stdlib.h>#define maxsize 100
阅读全文
摘要:/*设置一个静态变量记链表值的个数入栈是头插法 */#include<stdio.h>#include<stdlib.h>#include<malloc.h>static int count=0;typedef struct node{ int data; struct node *next;}st
阅读全文

浙公网安备 33010602011771号