c++数据结构
文章平均质量分 54
陶小童
这个作者很懒,什么都没留下…
展开
-
链式栈的基本操作
//fun.cpp #include #include"head.h" using namespace std; stack* InitStack(stack *s) { stack *p, *q; s = new stack(); s->data = 1; p = s; int m; cout cin >> m; for (int i = 0; i {原创 2017-10-29 13:30:58 · 400 阅读 · 0 评论 -
回溯走迷宫
#include #include using namespace std; int tap[100] = {0}, n; int map[10][10] = { { 1,1,1,1,1,1,1,1,1,1 }, { 1,0,0,0,0,0,0,0,0,1 }, { 1,0,1,1,1,0,1,1,0,1 }, { 1,0,0,0,1,0,1,1,0,1 }, { 1,0,1原创 2017-11-06 22:55:08 · 259 阅读 · 0 评论 -
顺序栈
fun.cpp #include"top.h" #include void InitStack(Sqstack&S) { int n; S.base = (SElemType*)malloc((STACK_INIT_SIZE) * sizeof(SElemType)); if (S.base == NULL) { cout } else { S.top = S.bas原创 2017-10-29 13:34:42 · 323 阅读 · 0 评论