欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

leetcode 棒球比赛 笔记

程序员文章站 2022-07-15 12:22:37
...

1,

int top=stack.pop();
int newTop=top+stack.peek();     
stack.push(top);     
stack.push(newTop);

栈的pop,push,peek

2, for(String s:ops)增强for语句

3,s.equals("+")

4,Integer.valueOf(s)

5,Integer.parseInt(s)