摘要:
class Solution { public int calculate(String s) { s = s.replace(" ", "")+'+'; //Add a '+' or '-' is necessary, otherwise, the case (1+1) will return 0 阅读全文
摘要:
这道题跟227题,背下来! Iterative: class Solution { public int calculate(String s) { s=s.replace(" ", "")+'+'; Stack<Integer> stk = new Stack<>(); int sign =1; 阅读全文