Java | Leetcode Java题解之第224题基本计算器
题目: 题解:
class Solution {public int calculate(String s) {Deque<Integer> ops new LinkedList<Integer>();ops.push(1);int sign 1;int ret 0;int n s.length();int i 0;while (i < n) {if (s.charAt(i) ) {i;} else if (s…
鸿蒙
2024/7/9 8:02:24