栈
抱着键盘入土
自己的未来掌握在自己的手里,只有自己对自己的未来负责,未来才会不至于残忍的对待你,今天的你如果戏弄了你自己,那么未来同样也会戏弄你!!!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
栈
/* stak; 1:创建栈顶标记指针 void init 2:元素入栈 void push 3:元素出栈 void pop 4:获取栈顶元素 top(返回值的类型为装入的数据的类型) 5:测定栈的元素数目 int size 6:栈判空 bool IsEmpty 7:栈清空 void DesTroy */ #include...原创 2019-05-26 20:41:47 · 119 阅读 · 0 评论 -
使用栈实现十进制数转化为N进制数
/* 使用栈求解及十进制数转化为N进制数 */ #include <iostream> #include <stack> using namespace std; void funca(int n,int m,stack<int> &stack_) { while(n){ stack_.push(n%m); ...原创 2019-05-26 23:25:41 · 3414 阅读 · 0 评论 -
括号匹配
/* 括号匹配 */ #include <iostream> #include <stack> using namespace std; void funca(char arr[],int length,bool &Result) { stack<char> stack_; if(arr == NULL || length &...原创 2019-05-27 18:30:30 · 137 阅读 · 0 评论 -
使用栈实现表达式求值
/* 使用栈实现表达式求值 */ #include <iostream> #include <string> #include <cmath> using namespace std; #define MAX_SIZE 7 #define MAX 1000 char rule[][7]={ {'>', '&g...原创 2019-06-01 17:32:28 · 1718 阅读 · 0 评论 -
汉诺塔(非递归求解)
/* 汉诺塔非递归求解 */ #include<iostream> #include<stack> using namespace std; typedef struct node{ int num; char a; char b; char c; }HNT; void funca(int num,char a,char b,c...原创 2019-06-02 13:58:55 · 343 阅读 · 0 评论
分享