![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
栈
BeToBe_
?????
展开
-
十进制和任意进制的转换
======================= s.push() 入栈 s.top() 取栈顶元素 s.pop() 出栈 s.empty() 栈不为空 ======================= 1.十进制转换成八进制/二进制 #include #include //#include"windows.h" using namespace std; int m原创 2017-07-11 19:07:06 · 566 阅读 · 0 评论 -
后缀数求值
后缀数求值: 后缀表达式求值的算法:step1:设置一个空栈;step2:从左到右扫描这个栈;step3; 如遇到操作数则入栈,若遇到运算符则从栈中退出两个元素(退一个出栈一次);step4:先退出的元素放在运算符右边,后退出的元素放到运算符左边;strp5:运算结果入栈;step6:回到step2,直到遍历完表达式 (循环表达式:3+(2-5)*6/3后缀表达式:3 2 5 - 6 3 / * ...原创 2017-07-11 19:27:57 · 417 阅读 · 0 评论 -
Polish notation
Polish notationReverse Polish notation (RPN) is a method for representing expressions in which the operator symbol is placed after the arguments being operated on. DescriptionPolish notation, in which...原创 2018-03-25 16:51:37 · 292 阅读 · 0 评论