数据结构
文章平均质量分 75
Asmire
在校学沫一枚。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
栈实现简单计算器的四则运算(STL)
#include using namespace std;stackst;stackcal;char s[1200],post[1200];double res;//中缀转后缀void trans(){ while(!st.empty()) st.pop(); int i=0,j=0; char ch; while(s[i]){原创 2017-04-12 16:33:00 · 627 阅读 · 0 评论 -
顺序栈的基本操作
顺序栈的基本操作:#include using namespace std;#define MAXSIZE 10typedef int ElemType;//创建栈typedef struct{ ElemType data[MAXSIZE]; int top;}SqStack;//初始栈void Init_Stack(SqStack *s){ s原创 2017-04-05 19:05:06 · 310 阅读 · 0 评论 -
链表基础操作
#include #include using namespace std;struct Node{ int data; struct Node *next;};void traverse(Node *h)//遍历链表{ Node *p; p=h; while(p!=NULL) { coutdata<<endl;原创 2017-03-22 20:20:19 · 293 阅读 · 0 评论
分享