栈和队列
死咸鱼的成长之路
这个作者很懒,什么都没留下…
展开
-
逆波兰数的计算(栈)(char与sting转换int)
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples ["2", "1", "+", "3", "*"] -...原创 2018-02-22 12:37:56 · 208 阅读 · 0 评论 -
优先队列(priority_queue)
int main() { priority_queue<int> qi; for( int i = 0 ; i < 10 ; i ++ ) qi.push(i); for( int i = 0 ; i < 10 ; i ++ ){ int t = qi.top(); cout << t << " "; qi.pop(); ...原创 2018-03-13 15:19:55 · 133 阅读 · 0 评论